sensor_angle: No need to send messages when stopping queries

Simplify the mcu code as any messages are ignored by the host anyway.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2023-12-17 11:35:40 -05:00
parent 95e1a290f1
commit dc6182f3b3
2 changed files with 4 additions and 10 deletions

View file

@ -230,13 +230,10 @@ command_query_spi_angle(uint32_t *args)
sched_del_timer(&sa->timer);
sa->flags = 0;
if (!args[2]) {
if (!args[2])
// End measurements
if (sa->data_count)
angle_report(sa, oid);
sendf("spi_angle_end oid=%c sequence=%hu", oid, sa->sequence);
return;
}
// Start new measurements query
sa->timer.waketime = args[1];
sa->rest_ticks = args[2];