Skip to content

Queens-Rocket-Engineering-Team/av-libraries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

516 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QRET Avionics Libraries

Shared firmware libraries for QRET's avionics stack.

These libraries support our STM32 nodes and the ESP32 comms board. They handle the underlying communication, logging, and storage infrastructure, allowing you to focus on application logic like reading sensors and controlling actuators.

What's Inside

  • AimNetwork: Manages CAN bus communication, time synchronization, and network health monitoring seamlessly in the background.
  • AimLogger: A lightweight logger that automatically adds timestamps and severity levels (like DEBUG or ERROR) to your messages.
  • AimFlashTable: Stores data directly to the board's serial flash memory. Includes a Python tool for extracting data post-flight.

Setup & Build

We use PlatformIO to manage libraries and board configurations.

Installation: You can install the PlatformIO IDE extension for VSCode or the standalone PlatformIO Core CLI. The official PlatformIO documentation provides excellent setup guides to get you running.

Essential Commands: Whether you use the VSCode UI or the terminal, the core operations are the same. Here is how you run them from the command line:

  • Compile code: pio run
  • Upload to board: pio run --target upload
  • Open Serial Monitor: pio device monitor

(Tip: In VSCode, you can also use the checkmark, right arrow, and plug icons on the bottom toolbar).

Quick Start

  1. Open an example folder (e.g., AimNetwork/examples/stm32_canbus) as a project in PlatformIO.
  2. Use standard Arduino functions in the main loop to handle your hardware:
    int pressureValue = analogRead(A0); 
    if (pressureValue > 500) {
        digitalWrite(LED_PIN, HIGH);
    }
  3. Use the logger to track events instead of Serial.print():
    LOG_INFO("Pressure value is: %d", pressureValue);
  4. Compile and upload your code. The provided example projects are the recommended starting points for any new firmware.

Design Notes

  • The CAN network design is intentionally narrow and predictable: mailbox-driven TX, destination filtering, bounded RX polling, and fixed-size static queues.
  • STM32 uses an internal HAL-based CAN backend instead of external libraries for precise hardware control.
  • ESP32 uses TWAI through the existing backend.

About

QRET Avionics shared firmware libraries for SRAD PCBs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors