Matthew's Portfolio
main.py File Reference

Runs the priority task scheduler. More...

Variables

list main.periods = [ 11, 5, 5, 11, 30]
 A list of periods that specify the frequency of tasks.
 
list main.kxMatrix = [2.4, 2.9, 10.0, 0.08]
 A list of K values for the x motor.
 
list main.kyMatrix = [3.5, 2.9, 13.0, 0.08]
 A list of K values for the x motor.
 
 main.tchPanelTask = touchPanelTask(debugFlag = False)
 Object for the Touch Panel Task.
 
 main.encTask = encoderTask(debugFlag = False)
 Object for theEncoder Task.
 
 main.motTask = motorTask(mTaskFlag = False)
 Object for the Motor Task.
 
 main.ctrlTask = ctrlTask(kxMatrix, kyMatrix, debugFlag = False)
 Object for the Controller Task.
 
 main.uiTask = uiTask(debugFlag = False)
 Object for the User Interface Task.
 
 main.dataColTask = dataTask(debugFlag = False)
 Object for the Data Collection Task.
 
 main.motorTaskObj
 Defining motorTask to be added to the Task List. More...
 
 main.encoderTaskObj
 Defining encoderTask to be added to the Task List. More...
 
 main.touchPanelTaskObj
 Defining touchPanelTask to be added to the Task List. More...
 
 main.ctrlTaskObj
 Defining controllerTask to be added to the Task List. More...
 
 main.uiTaskObj
 Defining uiTask to be added to the Task List. More...
 
 main.myuart = UART(2)
 Assign variable to UART port 2.
 

Detailed Description

Runs the priority task scheduler.

This program will automatically run on the Nucleo. This will add tasks to the cotask.py list, and then run the priority-based scheduler. This will be the location where the user could tune the gain values or adjust the periods of the tasks.
See source code here:
Main Source Code

Author
Ryan McLaughlin
Matthew Frost
Date
Originally created on 05/21/21
Last modified on 06/03/21

Variable Documentation

◆ ctrlTaskObj

main.ctrlTaskObj
Initial value:
1= cotask.Task (ctrlTask.ctrlTaskFcn, name = 'ctrlTask', priority = 1,
2 period = periods[3], profile = True, trace = False)
This class implements behavior common to tasks in a cooperative multitasking system which runs in Mic...
Definition: cotask.py:48

Defining controllerTask to be added to the Task List.

◆ encoderTaskObj

main.encoderTaskObj
Initial value:
1= cotask.Task (encTask.encTaskFcn, name = 'encoderTask', priority = 1,
2 period = periods[1], profile = True, trace = False)

Defining encoderTask to be added to the Task List.

◆ motorTaskObj

main.motorTaskObj
Initial value:
1= cotask.Task (motTask.motorTaskFcn, name = 'motorTask', priority = 1,
2 period = periods[0], profile = True, trace = False)

Defining motorTask to be added to the Task List.

◆ touchPanelTaskObj

main.touchPanelTaskObj
Initial value:
1= cotask.Task (tchPanelTask.tchPanelFcn, name = 'touchPanelTask', priority = 1,
2 period = periods[2], profile = True, trace = False)

Defining touchPanelTask to be added to the Task List.

◆ uiTaskObj

main.uiTaskObj
Initial value:
1= cotask.Task (uiTask.uiTaskFcn, name = 'uiTask', priority = 1,
2 period = periods[4], profile = True, trace = False)

Defining uiTask to be added to the Task List.