Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

🤔 Problem Statement

In the Zero-Pilot Architecture, System Manager is the highest level entity. System Manager parses controller inputs, overlooks and orchestrates the conversations between other managers, and manages the state of the drone.

Milestone 1 Implementation

For Milestone 1, System Manager is a simple class that has a manual flying mode. Here is a list of available functions with the System Manager class for Milestone 1.

Function Name

Purpose

Return Type

Public Functions

fly_manually

Puts device in manual control mode, gets data using SBUS, and executes commands on the motors using PWM Out driver.

None. Void Function.

Private Functions

set_control_mode

Sets the control method of the device. Mainly for state-keeping. In the future, it will notify AM about this change.

None. Void Function.

set_arm_mode

Sets the arm mode of the device. Mainly for state-keeping. In the future, it will notify AM about this change.

None. Void Function.

set_flight_mode

Sets the flight mode of the device. Mainly for state-keeping. In the future, it will notify AM about this change.

None. Void Function.

get_control_mode

Returns the current control mode on the device.

CONTROL_METHOD alias for int

get_arm_mode

Returns the current arm status on the device.

ARM_MODE alias for int

get_flight_mode

Returns the current flight mode set on device.

FLIGHT_MODE alias for int

execute_input

Executes passed data on the motors

None. Void Function.

Milestone 2 Implementation

Goal: Integrate Attitude Manager and Telemetry Manager by threading them so that the two managers run in “parallel”.

Current State: System Manager directly sends RC data to motors after converting it to percentages. Data is not processed at all. Watch Dog is called by System Manager every loop. Complicated arm/disarm fail-safe in place.

Key Notes:

  • Make sure to allocate enough time for each manager so that its processes have enough time to execute

  • May have to implement a queue for data

  • May have to implement interrupts

Reference Material

Link to previous SysManager https://github.com/UWARG/ZeroPilot-SW-3/tree/main/SystemManager

Link to a simple SysManager https://github.com/UWARG/SimpleSystemManager/blob/master/Core/Src/main.cpp

Miscellaneous Notes

Watch Dog: an electronic timer that is used to detect and recover from errors within embedded systems. Within a specific time period, the system has to notify the Watchdog that it is still operational. If the Watchdog does not receive this notification then it assumes there has been a failure and places the system into a known state (usually error state, in this case, disarm (I believe)).

  • No labels