theAgingApprentice / HexaFloorRide

Arduino based six legged robot project
MIT License
0 stars 0 forks source link

standardize loop() call to flow processing #210

Open nerdoug opened 1 year ago

nerdoug commented 1 year ago

Dispatching of flow processing tasks is done within the do_flow() function rather than in loop() like other tasks. This has several disadvantages:

The do_flow() function needs to be broken into pieces each of which is a task within loop(). This will replace the internal delay with a timed dispatch which will correct the invalid CPU usage numbers.

The new structure would also accommodate a new high priority routine with these task definitions in this order: 1) check for need to move legs (timer task) 2) any new high priority task 3) setup for new flow sequence 4) resume after timer equivalent to old delay 5) pre-calculate frame numbers to support flow transition smoothing