- Install the PlatformIO IDE extension in VSCode. It may take several minutes to install.
- Clone the repository and open it in VSCode.
- Wait for PlatformIO to initialize. Once it has initialized, run
PlatformIO: Uploadfrom the command palette.
- For each new feature you develop, checkout a new branch from the
testingbranch. - When the feature is complete, create a PR and merge your branch into
testing. Build from thetestingbranch onto the teensy to ensure the code compiles and works as intended. - When the
testingbranch is in working order, create a PR to mergetestingintomain. You will require another person to review this code and approve it for production code.
Rules:
- No magic numbers -> Name all variables.
- Minimum variable and function name size is 5 characters.
- All functions have header comments.
- Spaces before and after every operator.
- Maximum line length 100 characters.
- Name stamp all files you worked on.
Code Structure Google Doc
Code Diagram
Flight Time Calculation
Radio Integration
When you need to find MAVLink message IDs, structs, or decode helpers:
- Start from
#include <MAVLink.h>and open the dependency header at:.pio/libdeps/teensy41/MAVLink/MAVLink.h MAVLink.hincludesmavlink/common/mavlink.h, which includes the generated message headers.- Use
rgto locate the specific message name in the generated headers:rg -n "MAVLINK_MSG_ID_SET_POSITION_TARGET_GLOBAL_INT" .pio/libdeps/teensy41/MAVLink/mavlink/commonrg -n "set_attitude_target" .pio/libdeps/teensy41/MAVLink/mavlink/common
- The message definitions live in files like:
.pio/libdeps/teensy41/MAVLink/mavlink/common/mavlink_msg_set_position_target_global_int.h.pio/libdeps/teensy41/MAVLink/mavlink/common/mavlink_msg_set_attitude_target.h
