diff --git a/src/WVR.h b/src/WVR.h index 5b68b95..8e7fc24 100644 --- a/src/WVR.h +++ b/src/WVR.h @@ -8,6 +8,7 @@ #include "Arduino.h" + class WVR { public: WVR(); diff --git a/src/file_system.c b/src/file_system.c index 6ebd51c..aea9cb0 100644 --- a/src/file_system.c +++ b/src/file_system.c @@ -1068,7 +1068,10 @@ size_t get_website_chunk(size_t start_block, size_t toWrite, uint8_t *buffer, si void updateVoiceConfig(char *json){ feedLoopWDT(); - cJSON *vc_json = cJSON_Parse(json); + const cJSON *vc_json = cJSON_Parse(json); + if(vc_json == NULL){ + log_i("voice json too big :("); + } feedLoopWDT(); cJSON *voice = NULL; cJSON *note = NULL; @@ -1099,6 +1102,7 @@ void updateVoiceConfig(char *json){ if(voice_data[num_note].isRack > -1) { // this is a non-rack overwritting a former rack + log_i("deleting rack %d", voice_data[num_note].isRack); clear_rack(voice_data[num_note].isRack); voice_data[num_note].isRack = -1; } diff --git a/src/pot.h b/src/pot.h index 2204ff4..a6660d1 100644 --- a/src/pot.h +++ b/src/pot.h @@ -1,9 +1,15 @@ #ifndef POT_H #define POT_H +#ifdef __cplusplus + extern "C" { +#endif // #include "Arduino.h" void (* onPot)(uint32_t); void pot_init(void); +#ifdef __cplusplus + } +#endif #endif \ No newline at end of file