Renamed the debugStruct function to printStruct as it is more explicit, added the raw mail_box event value to what is being printed
This commit is contained in:
parent
8dd4648a06
commit
fc5359ec03
@ -226,14 +226,14 @@ void loop()
|
||||
case WEATHER_STATION:
|
||||
{
|
||||
memcpy(&wsdp, payload, sizeof(wsdp));
|
||||
debugStruct(&wsdp);
|
||||
printStruct(&wsdp);
|
||||
insertIntoDBError = insertIntoDB(&wsdp);
|
||||
}
|
||||
break;
|
||||
case CONNECTED_MAILBOX:
|
||||
{
|
||||
memcpy(&mdp, payload, sizeof(mdp));
|
||||
debugStruct(&mdp);
|
||||
printStruct(&mdp);
|
||||
insertIntoDBError = insertIntoDB(&mdp);
|
||||
}
|
||||
break;
|
||||
@ -279,14 +279,14 @@ void loop()
|
||||
case WEATHER_STATION:
|
||||
{
|
||||
memcpy(&wsdp, payload, sizeof(wsdp));
|
||||
debugStruct(&wsdp);
|
||||
printStruct(&wsdp);
|
||||
insertIntoDBError = insertIntoDB(&wsdp);
|
||||
}
|
||||
break;
|
||||
case CONNECTED_MAILBOX:
|
||||
{
|
||||
memcpy(&mdp, payload, sizeof(mdp));
|
||||
debugStruct(&mdp);
|
||||
printStruct(&mdp);
|
||||
insertIntoDBError = insertIntoDB(&mdp);
|
||||
}
|
||||
break;
|
||||
@ -324,14 +324,14 @@ void loop()
|
||||
case WEATHER_STATION:
|
||||
{
|
||||
memcpy(&wsdp, payload, sizeof(wsdp));
|
||||
debugStruct(&wsdp);
|
||||
printStruct(&wsdp);
|
||||
insertIntoDBError = insertIntoDB(&wsdp);
|
||||
}
|
||||
break;
|
||||
case CONNECTED_MAILBOX:
|
||||
{
|
||||
memcpy(&mdp, payload, sizeof(mdp));
|
||||
debugStruct(&mdp);
|
||||
printStruct(&mdp);
|
||||
insertIntoDBError = insertIntoDB(&mdp);
|
||||
}
|
||||
break;
|
||||
@ -455,7 +455,7 @@ HttpClient::HttpQueryStatus insertIntoDB(WeatherStationDataPacket *p)
|
||||
return result;
|
||||
}
|
||||
|
||||
void debugStruct(WeatherStationDataPacket *p)
|
||||
void printStruct(WeatherStationDataPacket *p)
|
||||
{
|
||||
Serial.println("##############WEATHER STATION DATA##############");
|
||||
Serial.print("ID : ");
|
||||
@ -534,7 +534,7 @@ HttpClient::HttpQueryStatus insertIntoDB(MailboxDataPacket *p)
|
||||
return result;
|
||||
}
|
||||
|
||||
void debugStruct(MailboxDataPacket *p)
|
||||
void printStruct(MailboxDataPacket *p)
|
||||
{
|
||||
Serial.println("##############MAILBOX DATA##############");
|
||||
Serial.print("ID : ");
|
||||
@ -545,7 +545,7 @@ void debugStruct(MailboxDataPacket *p)
|
||||
|
||||
Serial.printf("BATT : %.5f V\n", p->battery);
|
||||
|
||||
Serial.print("EVENT : ");
|
||||
Serial.printf("EVENT : %d\n", p->mailbox_event);
|
||||
switch(p->mailbox_event)
|
||||
{
|
||||
case MAILBOX_LETTER:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user