pioneers / runtime

Firmware for the PiE kit robots and devices
7 stars 2 forks source link

[LOWCAR] Update last_recv_msg_time on both DEVICE_PING and DEVICE_WRITE #246

Closed levincent06 closed 1 year ago

levincent06 commented 3 years ago

We consider dev handler as "timing out" if a lowcar device hasn't received a message from dev handler in TIMEOUT milliseconds. Currently, we record the timestamp of the most recent DEVICE_PING to determine this. We should update this timestamp when we receive a DEVICE_WRITE as well.

This fix should need only a few lines of modifying Device.cpp