ME 305 Group 6 Documentation
Functions | Variables
taskDataCollect.py File Reference

For collecting data and saving it to a write file. More...

Functions

def taskDataCollect.taskDataFcn (str taskName, int period, shares.Share data_collect_flag, shares.Share x_position_signal, shares.Share y_position_signal, shares.Share ball_detected, shares.Share euler_angles, PrintQueue print_queue)
 Function to execute the state management functionality for the data collection task. More...
 

Variables

 taskDataCollect.S0_WAIT = micropython.const(0)
 State 0. More...
 
 taskDataCollect.S1_COLLECT = micropython.const(1)
 State 1. More...
 

Detailed Description

For collecting data and saving it to a write file.

Handles the data collection and saving to a file.

Author
Caleb Savard
Chris Linthacum
Date
March 16, 2022

Function Documentation

◆ taskDataFcn()

def taskDataCollect.taskDataFcn ( str  taskName,
int  period,
shares.Share  data_collect_flag,
shares.Share  x_position_signal,
shares.Share  y_position_signal,
shares.Share  ball_detected,
shares.Share  euler_angles,
PrintQueue  print_queue 
)

Function to execute the state management functionality for the data collection task.

Function manages states for the management of data collection. Collects data at sample period and writes to file after data collection is complete.

Parameters
taskNameTask name string for debugging purposes.
periodData sample period - how often the function runs.
data_collect_flagFlag for whether data collection should be enabled or disabled.
x_position_signalShared variable for passing in the ball's X position on the platform.
y_position_signalShared variable for passing in the ball's Y position on the platform.
ball_detectedShared variable for indicating if the ball is on the touch panel.
euler_anglesShared variable for passing in the platform's orientation.
print_queueShared variable for passing out print statements.

Variable Documentation

◆ S0_WAIT

taskDataCollect.S0_WAIT = micropython.const(0)

State 0.

Maps state 0 (WAIT) to a more readable const.

◆ S1_COLLECT

taskDataCollect.S1_COLLECT = micropython.const(1)

State 1.

Maps state 1 (COLLECT) to a more readable const.