Avionics Setup - Terrapin-Rocket-Team/SRAD-Avionics GitHub Wiki

Home/Getting Started/Avionics Setup

Avionics Setup

This page is a guide to setting up the Avionics subteam's development environment. It is intended for new members, but may be useful for experienced members as well.

Coding Environment

All current team members use Visual Studio Code (VSCode) with the PlatformIO extension for coding the flight computer. This is the recommended setup for new members. VSCode is more capable than the Arduino IDE, and PlatformIO is a more powerful and flexible (important for moving away from Arduino) build system than the Arduino IDE. It also integrates well with GitHub, which we use for version control. Besides PlatformIO, we recommend a number of other extensions, which are listed in the "Install VSCode" page.

Hardware Environment

We use KiCad for PCB design, and SolidWorks for all CAD work. We use GitHub for version control of our PCB designs. If you do not have a git client installed and do not plan on using VSCode, we recommend installing GitHub Desktop.

Best Practices/Standards

Code:

  • Use camelCase for variable and function names. Do not start variables and functions with an upper case letter.
  • Use PascalCase for class names. Start class names with an upper case letter.
  • Use UPPER_CASE for constants. Separate words with underscores.
  • Use descriptive names for variables, functions, and classes, especially if they are public.
  • Place comments near variables and functions to explain their purpose and/or units.
  • Keep all units in SI unless modifying them for immediate printing or display.
  • Use include guards in header files.
  • When possible, use constexpr instead of #define.
  • Use classes and object-oriented programming as much as possible. (not structs)
  • Use nullptr instead of NULL.
  • Avoid use of std:: or Arduino library functions in header files. Use c-string-based char[]s for higher portability. (Reasoning: Some Arduino platforms cannot use std:: functions, and other platforms cannot use Arduino functions.)
  • Keep commit messages short and descriptive. If a commit message is too long, use the first line as a summary and new lines for details.

PCB Design:

  • Don't do it badly.

CAD:

  • Use SolidWorks.
  • Don't make it not good.

See Also:

⚠️ **GitHub.com Fallback** ⚠️