get tcp working
This commit is contained in:
parent
f107bfb55b
commit
65ad286add
2 changed files with 23 additions and 28 deletions
14
node1.c
14
node1.c
|
|
@ -145,13 +145,13 @@ static bool cb_30(__unused struct repeating_timer *t) {
|
|||
current_bem280_reading.humidity);
|
||||
printf("Sending data to backend server...\n");
|
||||
printf("MSG: %s", msg);
|
||||
// bool success = tcp_client_send_message(&tcp_config, msg);
|
||||
// if (success) {
|
||||
// printf("✓ Data sent successfully\n");
|
||||
// comms_led_blink();
|
||||
// } else {
|
||||
// printf("✗ Failed to send data\n");
|
||||
// }
|
||||
bool success = tcp_client_send_message(&tcp_config, msg);
|
||||
if (success) {
|
||||
printf("✓ Data sent successfully\n");
|
||||
comms_led_blink();
|
||||
} else {
|
||||
printf("✗ Failed to send data\n");
|
||||
}
|
||||
} else {
|
||||
printf("WiFi not connected, skipping send\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue