|
|
|
@ -198,9 +198,9 @@ int main (int argc, char **arv) {
@@ -198,9 +198,9 @@ int main (int argc, char **arv) {
|
|
|
|
|
fscanf(serial, "%s%d", string, &val); |
|
|
|
|
if (!strcmp(string, "temp:")) { |
|
|
|
|
printf("Temperature: %d\n", val); |
|
|
|
|
} |
|
|
|
|
if (last_time != time_now) { |
|
|
|
|
insert_rec(db, INSERT_TEMP_TEMPL, val, WTHR_STATION_ID, time_now); |
|
|
|
|
if (last_time != time_now) { |
|
|
|
|
insert_rec(db, INSERT_TEMP_TEMPL, val, WTHR_STATION_ID, time_now); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!strcmp(string, "humi:")) { |
|
|
|
|
printf("Relative Humidity: %d\n", val); |
|
|
|
|