|
ME 405 Term Project
|
Public Member Functions | |
| __init__ (self, stream_data, uart, time_sh, left_pos_sh, right_pos_sh, left_vel_sh, right_vel_sh, motor_data_ready, abort) | |
| run (self) | |
Public Attributes | |
| ser = uart | |
| stream_data = stream_data | |
| motor_data_ready = motor_data_ready | |
| abort = abort | |
| time_sh = time_sh | |
| left_pos_sh = left_pos_sh | |
| right_pos_sh = right_pos_sh | |
| left_vel_sh = left_vel_sh | |
| right_vel_sh = right_vel_sh | |
| int | sent_end = 0 |
| 0: INIT STATE -----------------------------------------------— | |
| int | lines_sent = 0 |
| 0: INIT STATE -----------------------------------------------— | |
| int | state = self.S0_INIT |
| 0: INIT STATE -----------------------------------------------— | |
Static Public Attributes | |
| int | S0_INIT = 0 |
| int | S1_WAIT_FOR_TRIGGER = 1 |
| int | S2_STREAM_DATA = 2 |
Streams data (in CSV format) over Bluetooth if enabled.
Attributes:
ser: Serial interface (Bluetooth UART).
stream_data: Flag to control whether streaming is active.
time_sh: Share for the current time.
left_pos_sh: Share for the left encoder position.
right_pos_sh: Share for the right encoder position.
left_vel_sh: Share for the left encoder velocity.
right_vel_sh: Share for the right encoder velocity.
motor_data_ready: Flag indicating new motor data is available.
abort: Flag to abort streaming immediately.
| stream_task.StreamTask.__init__ | ( | self, | |
| stream_data, | |||
| uart, | |||
| time_sh, | |||
| left_pos_sh, | |||
| right_pos_sh, | |||
| left_vel_sh, | |||
| right_vel_sh, | |||
| motor_data_ready, | |||
| abort ) |
| stream_task.StreamTask.abort = abort |
| stream_task.StreamTask.left_pos_sh = left_pos_sh |
| stream_task.StreamTask.left_vel_sh = left_vel_sh |
| int stream_task.StreamTask.lines_sent = 0 |
0: INIT STATE -----------------------------------------------—
1: WAIT FOR TRIGGER STATE -----------------------------------—
2: STREAM DATA STATE ----------------------------------------—
| stream_task.StreamTask.motor_data_ready = motor_data_ready |
| stream_task.StreamTask.right_pos_sh = right_pos_sh |
| stream_task.StreamTask.right_vel_sh = right_vel_sh |
|
static |
|
static |
|
static |
| int stream_task.StreamTask.sent_end = 0 |
0: INIT STATE -----------------------------------------------—
1: WAIT FOR TRIGGER STATE -----------------------------------—
2: STREAM DATA STATE ----------------------------------------—
| stream_task.StreamTask.ser = uart |
| int stream_task.StreamTask.state = self.S0_INIT |
0: INIT STATE -----------------------------------------------—
1: WAIT FOR TRIGGER STATE -----------------------------------—
| stream_task.StreamTask.stream_data = stream_data |
| stream_task.StreamTask.time_sh = time_sh |