Skip to content
Snippets Groups Projects

Fixes output formatting and variable initialization, moving config to separate file, project folder correctly named, hopefully fixes network crashes

Merged Kyrre Ness Sjobaek requested to merge dev into master
+ 9
1
@@ -65,7 +65,7 @@ const unsigned long WEB_timeout = 600; //[ms] Max time allowed waiting
// ***** GLOBAL VARIABLES ***********************
unsigned long prevUpdateTime;
unsigned long prevUpdateTime = 0;
float measData[numCh];
bool measDataFresh[numCh];
@@ -557,6 +557,10 @@ void TXTserver (uint8_t ch) {
//clients[i].println(ch);
//Feed the new client some data right away
if(measData[ch] >= 0) {
//Add the '+' so that the string is always the same length
clients[i].print('+');
}
clients[i].print(measData[ch],3);
if (measDataIsValid[ch]) {
if (measDataIsMm[ch]) {
@@ -595,6 +599,10 @@ void TXTserver (uint8_t ch) {
if (measDataFresh[ch]) {
for (byte i = 0; i < MAX_SOCK_NUM; i++) {
if (clients[i] && (clients_ch[i]==ch)) {
if(measData[ch] >= 0) {
//Add the '+' so that the string is always the same length
clients[i].print('+');
}
clients[i].print(measData[ch],3);
if (measDataIsValid[ch]) {
if (measDataIsMm[ch]) {
Loading