ICSim
ICSim copied to clipboard
Rate limit control loop
Right now there's just a delay sleep(x) in every iteration of the main loop. This makes is so that the CAN messages can come in at an inconsistent rate. In text mode, the default delay was sending too many messages for the IC to keep up.
The loop should track how long since the last loop, and if it's going to fast, then sleep the appropriate amount of time.