ME 305 Group 6 Documentation
|
Manages the states for the encoder task. More...
Functions | |
def | taskEncoder_03.taskEncoderFcn_03 (str taskName, int period, int sample_period, shares_03.Share_03 zFlag, shares_03.Share_03 pFlag, shares_03.Share_03 dFlag, shares_03.Share_03 gFlag, shares_03.Share_03 sFlag, shares_03.Share_03 dataPrint, shares_03.Share_03 testData, shares_03.Share_03 vFlag) |
Function to execute the state management functionality for the encoder tasks. More... | |
Manages the states for the encoder task.
Manages the current state and executes state-related logic for all encoder related functionality. Cycles through state for initialization, updating encoder, and zeroing encoder position.
def taskEncoder_03.taskEncoderFcn_03 | ( | str | taskName, |
int | period, | ||
int | sample_period, | ||
shares_03.Share_03 | zFlag, | ||
shares_03.Share_03 | pFlag, | ||
shares_03.Share_03 | dFlag, | ||
shares_03.Share_03 | gFlag, | ||
shares_03.Share_03 | sFlag, | ||
shares_03.Share_03 | dataPrint, | ||
shares_03.Share_03 | testData, | ||
shares_03.Share_03 | vFlag | ||
) |
Function to execute the state management functionality for the encoder tasks.
Function manages states for the management of encoder functions. Performs all encoder related tasks including position updates, checking and storing encoder data, recording encoder position data, and zeroing the encoder when requested.
taskName | Brief string to describe the instance of the function. Useful for debug purposes. |
period | Period with which to run the function and update/execute state logic. |
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. |
sample_period | Period to record position data when recording position data vs. time. |
dataPrint | Shared data object to store the recorded encoder data. Stores both the position data and time values. |
testData | Shared data object to act as a flag to record avg velocity and to store the velocity data during testing. @yield state If task ran, yields state the function is now in. If task did not evaluate, returns None. |