ESP-MQTT-JSON-Multisensor icon indicating copy to clipboard operation
ESP-MQTT-JSON-Multisensor copied to clipboard

Add function declarations

Open wayne47git opened this issue 7 years ago • 2 comments

I'm not real familiar with this development environment but I've been hacking C code for over 40 years and doing embedded systems for 35+.

I've been using Platformio to program my Sonoff devices so used that to build the Multisensor code as well. I needed to declare all the functions to make it compile (and, really, it's just a "good idea" to do that anyway). Suggest adding them:

void callback(char*, byte*, unsigned int);
void reconnect();
bool processJson(char* message);
void setColor(int inR, int inG, int inB);
int calculateVal(int step, int val, int i);
int calculateStep(int prevValue, int endValue);
void loop();
float calculateHeatIndex(float humidity, float temp);
void software_Reset() ;```

wayne47git avatar Apr 17 '18 02:04 wayne47git

I've been told that too by better coders than me. Is that going to help code stability or just speed up compilation ?

mr-sneezy avatar Apr 26 '18 12:04 mr-sneezy

it doesn't do anything for code stability. It was necessary til I think IDE 1.6.7 if the functions were in a separate file, but no longer necessary now

consolacion avatar Jul 14 '18 20:07 consolacion