mirror of
https://github.com/eddyem/small_tel.git
synced 2026-05-01 18:37:07 +03:00
simplest local weather proxy over SHM
This commit is contained in:
13
Daemons/weather_proxy/weather_clt_example.c
Normal file
13
Daemons/weather_proxy/weather_clt_example.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "weather_data.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
weather_data_t wd;
|
||||
if (get_weather_data(&wd) == 0) {
|
||||
printf("Weather: %d, Max wind: %.1f, Wind: %.1f, Temp: %.1f; updated @%.1f\n",
|
||||
wd.weather, wd.windmax, wd.wind, wd.exttemp, wd.last_update);
|
||||
} else {
|
||||
fprintf(stderr, "Failed to get weather data\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user