From 373525c608541a35e53eafbee877fb09f68d8645 Mon Sep 17 00:00:00 2001 From: Johnathon Slightham Date: Tue, 15 Jul 2025 11:11:03 -0400 Subject: [PATCH] Create instructions for adding actuators --- main/control/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 main/control/README.md diff --git a/main/control/README.md b/main/control/README.md new file mode 100644 index 0000000..96ba57f --- /dev/null +++ b/main/control/README.md @@ -0,0 +1,11 @@ +# Adding New Modules + +## Adding Actuators +1. Append the actuator you want to add to the enum in the [RobotModule flatbuffer definition](https://git.uwaterloo.ca/capstone-group2/flatbuffers/-/blob/main/RobotModule.fbs?ref_type=heads) +- Propagate this change to this repository in the [flatbuffer](https://git.uwaterloo.ca/capstone-group2/firmware/-/tree/main/components/flatbuffers?ref_type=heads) component, and the [Control library](https://git.uwaterloo.ca/capstone-group2/control). +2. Update any of the entries in the [Constants module](https://git.uwaterloo.ca/capstone-group2/firmware/-/blob/main/components/constants/include/constants/module.h?ref_type=heads) that depend on the module type (for instance, `MODULE_TO_NUM_CHANNELS_MAP`). +3. Create a header file for the module, implementing `IActuator`. +4. Implement the actuator +- Deserialize the control message with Flatbuffers to match the message sent by the control library. +- Do not block for too long in the `actuate` function, as this will block the main control loop. +4. Add the actuator to the `ActuatorFactory`.