mbot-project / mbot_sys_utils

Install scripts and utilities for setting up MBot environment on Ubuntu/Debian
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

added 2nd thread to handle lcm message, to prevent battery info delay #19

Closed sxy-sun closed 1 week ago

sxy-sun commented 2 weeks ago

What's new:

Previously, both lc.handle() and screen updates were executed within the same loop. As a result, screen update delays could block the handling of new messages. By decoupling these processes, we ensure timely message handling and smoother operation.

18

sxy-sun commented 2 weeks ago

Working on adding more cases:

  1. Battery = -1 means no message received -> Display ???
  2. Battery in (3.5, 5.5) means the barrel plug is unplugged - > Display Control Board Not Powered
  3. Battery in (6, 7) means the jumper cap is on 6 V -> Display Moter Volt: XXX V
  4. Battery in (7, 12) means the jumper cap is on 12 V -> Display the voltage and flash the screen when it drops below 9 V
  5. 10 seconds without new analog message -> set battery = -1 and display ???
  6. Battery in (0, 1.5) means no jumper cap > Display "No Jumper Cap"
sxy-sun commented 2 weeks ago

Cases listed above are all done and tested.