aboutsummaryrefslogtreecommitdiff
path: root/client/main.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-06-26 17:40:36 +0200
committerlonkaars <loek@pipeframe.xyz>2022-06-26 17:40:36 +0200
commit2a0270f3ba6eb993fb39ed3564f626d724156654 (patch)
treed8d310eb35768f84d25453eae4b8cd4721bd8ddf /client/main.c
parent55fe6aaeee49894dc07516f0c4e21f692b2950fe (diff)
implement battery measurement and target area switching
Diffstat (limited to 'client/main.c')
-rw-r--r--client/main.c5
1 files changed, 5 insertions, 0 deletions
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);
+ }
}
}