The master board runs a state machine that handles the differents stages of communication and errors that can occur.
Diagram generated using Mermaid Live Editor, click on picture to edit.
During WAITING_FOR_INIT, the master board waits for an init message from both ethernet and wifi, checking all channels. This enables an autoselection of the type of communication with the computer.
Please note that WIFI_ETH_LINK_DOWN state is accessible from any state except WAITING_FOR_INIT via a callback on the ethernet link down event, but links have not been drawn for the sake of readability.
To each state is associated a LED behaviour.
State | LED behaviour |
---|---|
SETUP | Steady White |
WAITING_FOR_INIT | Red Fade |
SPI_AUTODETECT | Magenta Fade |
SENDING_INIT_ACK | Blue Fade |
ACTIVE_CONTROL | Green Fade |
WIFI_ETH_LINK_DOWN | Yellow Blink |
WIFI_ETH_ETH_ERROR | Red Blink |