Skip to content

Commit 221683c

Browse files
committed
Removing unused debug primitive for stack overflow debugging
1 parent 0482c31 commit 221683c

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

Diff for: src/cbor/ArduinoCloudThing.cpp

-19
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,6 @@
2727

2828
#include "ArduinoCloudThing.h"
2929

30-
/******************************************************************************
31-
DEBUG FUNCTIONS
32-
******************************************************************************/
33-
34-
#if defined(DEBUG_MEMORY) && defined(ARDUINO_ARCH_SAMD)
35-
extern "C" char *sbrk(int i);
36-
void PrintFreeRam(void) {
37-
char stack_dummy = 0;
38-
//Serial.print("Free RAM: "); //Serial.println(&stack_dummy - sbrk(0));
39-
}
40-
#endif
41-
42-
#ifdef ARDUINO_ARCH_MRAA
43-
#define Serial DebugSerial
44-
#endif
45-
4630
/******************************************************************************
4731
CTOR/DTOR
4832
******************************************************************************/
@@ -84,9 +68,6 @@ int ArduinoCloudThing::encode(uint8_t * data, size_t const size, bool lightPaylo
8468
return -1;
8569
}
8670

87-
#if defined(DEBUG_MEMORY) && defined(ARDUINO_ARCH_SAMD)
88-
PrintFreeRam();
89-
#endif
9071
int const bytes_encoded = cbor_encoder_get_buffer_size(&encoder, data);
9172
return bytes_encoded;
9273
}

0 commit comments

Comments
 (0)