Main Control Loop - MatthewMArnold/taproot GitHub Wiki

In aruw-mcb, thanks to taproot the control loop is very simple. taproot and modm are designed around polling and as such does not provide interrupt callbacks. Thus, a single threaded execution model is followed. Where thread-like behavior is required, protothreads are utilized. UART and CAN buffers are filled in interrupt handlers by modm HALs and then polled by drivers in the main loop at a high frequency. A high level diagram is as follows:

For more detailed control loops for individual subsystems, see the "Theoretical Support Analysis" section.