![]() |
ME 305 Group 6 Documentation
|
Manages the states for the User Interface task. More...
Functions | |
| def | taskUser_02.printLegend_02 () |
| Prints the available user key commands to the console. More... | |
| def | taskUser_02.taskUserFcn_02 (str task_name, int period, shares_02.Share_02 zFlag, shares_02.Share_02 pFlag, shares_02.Share_02 dFlag, shares_02.Share_02 gFlag, shares_02.Share_02 sFlag, shares_02.Share_02 dataPrint) |
| Main task function to control UI states. More... | |
Variables | |
| taskUser_02.S0_INIT = micropython.const(0) | |
| taskUser_02.S1_CMD = micropython.const(1) | |
| taskUser_02.S2_ZERO = micropython.const(2) | |
| taskUser_02.S3_PRINT = micropython.const(3) | |
Manages the states for the User Interface task.
Manages the current state and executes state-related logic for all User Interface functionality. Cycles through states for processing input, zeroing encoder position, and printing output.
| def taskUser_02.printLegend_02 | ( | ) |
Prints the available user key commands to the console.
Prints a table of available user input commands to the console to preview the available user key commands.
| def taskUser_02.taskUserFcn_02 | ( | str | task_name, |
| int | period, | ||
| shares_02.Share_02 | zFlag, | ||
| shares_02.Share_02 | pFlag, | ||
| shares_02.Share_02 | dFlag, | ||
| shares_02.Share_02 | gFlag, | ||
| shares_02.Share_02 | sFlag, | ||
| shares_02.Share_02 | dataPrint | ||
| ) |
Main task function to control UI states.
Manage different User Input states, including Init, Read_Cmd, Zero_Encoder, and Print_Data. On function run, executes the logic of the current state and if appropriate shifts state for next run of function.
| task_name | Task name for the function to help with debugging |
| period | Period to run execute function at. Period defines frequency that states are executed and refreshed. |
| zFlag | Shared data object to encapsulate the z key being pressed. Signals that encoder should be zeroed. |
| pFlag | Shared data object to encapsulate the p key being pressed. Signals to print the encoder position. |
| dFlag | Shared data object to encapsulate the d key being pressed. Signals to print the encoder delta. |
| gFlag | Shared data object to encapsulate the g key being pressed. Signals to begin data collection. |
| sFlag | Shared data object to encapsulate the s key being pressed. Signals to end data collection prematurely. |
| dataPrint | Shared data object to store the recorded encoder data. Stores both the position data and time values. @yield state If task ran, yields state the function is now in. If task did not evaluate, returns None. |