/* Main loop of the firmware Proposed architecture checkMsgs(); if(msg is command){ activate command handling } else if(msg is query){ format response to query } StepCurrentCommand(); StepMotors(); StepLED(); StepWhateverElseNeedsStepping(); The idea behind the Step* routines is to keep each automaton non-blocking allowing for some “concurrency”. Some FW components will leverage ISR to do their stuff (UART, motor stepping?, etc.)  */
void loop()
/* Main loop of the firmware Proposed architecture checkMsgs(); if(msg is command){ activate command handling } else if(msg is query){ format response to query } StepCurrentCommand(); StepMotors(); StepLED(); StepWhateverElseNeedsStepping(); The idea behind the Step* routines is to keep each automaton non-blocking allowing for some “concurrency”. Some FW components will leverage ISR to do their stuff (UART, motor stepping?, etc.)  */
void loop()
{
        mf::finda.Step();
        mfs::fsensor.Step();
        mi::idler.Step();
        ms::selector.Step();
        mpu::pulley.Step();
        mui::userInput.Step();
    }
    hal::cpu::Step();
    mu::cdc.Step();
    RuntimeHWChecks();
    application.Step();
    hal::watchdog::Reset();
}