Rest return fixes; Sensornode delay fix
This commit is contained in:
@@ -61,16 +61,17 @@ int main(void) {
|
||||
//start rest requests
|
||||
nodedata[i].pin = 0; //This data isn't relevant for a sensornode
|
||||
strcpy(nodedata[i].ip, currentNode->ip);
|
||||
getRestSensor(&nodedata[i]);
|
||||
nodedata[i].isoutside = currentNode->isoutside; //copy the boolean value
|
||||
printf("Acquiring rest response\n");
|
||||
if (getRestSensor(&nodedata[i])) {
|
||||
nodedata[i].isoutside = currentNode->isoutside; //copy the boolean value
|
||||
printf("Acquiring rest response\n");
|
||||
|
||||
printf("Temperature: %f, Humidity: %f, NodeID: %i, Outside: %s, AbsoluteHumidity: %f\n", nodedata[i].temperature, nodedata[i].humidity, nodedata[i].node_id, nodedata[i].isoutside ? "Yes" : "No", absoluteHumidity(&nodedata[i]));
|
||||
|
||||
//Insert data into database
|
||||
printf("Insert data into stats table\n");
|
||||
insertData(&nodedata[i]);
|
||||
printf("Temperature: %f, Humidity: %f, NodeID: %i, Outside: %s, AbsoluteHumidity: %f\n", nodedata[i].temperature, nodedata[i].humidity, nodedata[i].node_id, nodedata[i].isoutside ? "Yes" : "No", absoluteHumidity(&nodedata[i]));
|
||||
|
||||
//Insert data into database
|
||||
printf("Insert data into stats table\n");
|
||||
insertData(&nodedata[i]);
|
||||
}
|
||||
|
||||
currentNode = currentNode->next;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user