Skip to content

Commit

Permalink
Decrease buffer size for Mega, fix warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
  • Loading branch information
SRGDamia1 committed May 28, 2024
1 parent f562907 commit 302f0af
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/LogBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@
* compiling. 8192 bytes is a safe value for the Mayfly 1.1 with six variables.
*/
#ifndef MS_LOG_DATA_BUFFER_SIZE
#ifdef ARDUINO_AVR_MEGA2560
#define MS_LOG_DATA_BUFFER_SIZE 2048
#else
#define MS_LOG_DATA_BUFFER_SIZE 8192
#endif
#endif

#include <stddef.h>
#include <inttypes.h>
Expand Down
2 changes: 1 addition & 1 deletion src/publishers/DreamHostPublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void DreamHostPublisher::begin(Logger& baseLogger, const char* dhUrl) {

// Post the data to dream host.
// int16_t DreamHostPublisher::postDataDreamHost(void)
int16_t DreamHostPublisher::publishData(Client* outClient, bool forceFlush) {
int16_t DreamHostPublisher::publishData(Client* outClient, bool) {
// Create a buffer for the portions of the request and response
char tempBuffer[37] = "";
uint16_t did_respond = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/publishers/ThingSpeakPublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void ThingSpeakPublisher::begin(Logger& baseLogger,

// This sends the data to ThingSpeak
// bool ThingSpeakPublisher::mqttThingSpeak(void)
int16_t ThingSpeakPublisher::publishData(Client* outClient, bool forceFlush) {
int16_t ThingSpeakPublisher::publishData(Client* outClient, bool ) {
bool retVal = false;

// Make sure we don't have too many fields
Expand Down
2 changes: 1 addition & 1 deletion src/publishers/UbidotsPublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void UbidotsPublisher::begin(Logger& baseLogger,
// over that connection.
// The return is the http status code of the response.
// int16_t EnviroDIYPublisher::postDataEnviroDIY(void)
int16_t UbidotsPublisher::publishData(Client* outClient, bool forceFlush) {
int16_t UbidotsPublisher::publishData(Client* outClient, bool) {
// Create a buffer for the portions of the request and response
char tempBuffer[37] = "";
uint16_t did_respond = 0;
Expand Down

0 comments on commit 302f0af

Please sign in to comment.