From 2a0270f3ba6eb993fb39ed3564f626d724156654 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 26 Jun 2022 17:40:36 +0200 Subject: implement battery measurement and target area switching --- client/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client/main.c') diff --git a/client/main.c b/client/main.c index 4d7f484..4eed232 100644 --- a/client/main.c +++ b/client/main.c @@ -33,5 +33,10 @@ int main(int argc, char **argv) { g_w2_state.ping_received = false; w2_send_ping(); } + + if (w2_timer_end(W2_TIMER_INFO) > W2_BATTERY_MEAS_FREQ) { + w2_send_info(); + w2_timer_start(W2_TIMER_INFO); + } } } -- cgit v1.2.3