Commit 061364a8 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

monitor.c: add temperature information to logs

parent 7b4b2c33
......@@ -8,6 +8,7 @@
#include "pps_gen.h"
#include "util.h"
#include "timer.h"
#include "onewire.h"
#define UI_REFRESH_PERIOD TICS_PER_SECOND /* 1 sec */
......@@ -122,6 +123,8 @@ int wrc_log_stats(void)
int aux_stat;
uint64_t sec;
uint32_t nsec;
int16_t brd_temp = 0;
int16_t brd_temp_frac = 0;
pps_gen_get_time(&sec, &nsec);
halexp_get_port_state(&ps, NULL);
......@@ -150,6 +153,9 @@ int wrc_log_stats(void)
);
mprintf("ucnt:%d ", (int32_t)cur_servo_state.update_count);
own_readtemp(ONEWIRE_PORT, &brd_temp, &brd_temp_frac);
mprintf("temp:%d.%02d C", brd_temp, brd_temp_frac);
mprintf("\n");
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment