ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
Loading...
Searching...
No Matches
fc_config_t Struct Reference

#include <fc_core.h>

Data Fields

uint16_t sensors
 CAPS bits detected at boot

 
uint8_t n_motors
 4, 6 or 8

 
uint8_t motors_built
 0: MOTOR_TEST -> UNSUPPORTED

 
void(* motors_arm )(uint8_t armed)
 outputs (ImuTask context); may be NULL on the host
 
void(* motor_test )(uint8_t motor, float duty)
 motor 0 = all off
 
void(* on_event )(const fc_event_t *e)
 every event also goes here (flight-control context), e.g.
 
uint8_t batt_monitor
 a BattTask measures the battery

 
uint8_t(* usb_host )(void)
 1 while a USB host is connected: ARM, TAKEOFF and MOTOR_TEST are refused (USB_CONNECTED, ADR 0009); may be NULL (no USB)
 

Detailed Description

Definition at line 69 of file fc_core.h.

Field Documentation

◆ sensors

uint16_t fc_config_t::sensors

CAPS bits detected at boot

Definition at line 70 of file fc_core.h.

Referenced by app_start(), and fc_init().

◆ n_motors

uint8_t fc_config_t::n_motors

4, 6 or 8

Definition at line 71 of file fc_core.h.

Referenced by exec(), and fc_init().

◆ motors_built

uint8_t fc_config_t::motors_built

0: MOTOR_TEST -> UNSUPPORTED

Definition at line 72 of file fc_core.h.

Referenced by exec().

◆ motors_arm

void(* fc_config_t::motors_arm) (uint8_t armed)

outputs (ImuTask context); may be NULL on the host

Definition at line 74 of file fc_core.h.

Referenced by disarm(), and exec().

◆ motor_test

void(* fc_config_t::motor_test) (uint8_t motor, float duty)

motor 0 = all off

Definition at line 75 of file fc_core.h.

Referenced by exec(), and test_stop().

◆ on_event

void(* fc_config_t::on_event) (const fc_event_t *e)

every event also goes here (flight-control context), e.g.

to the log; may be NULL

Definition at line 77 of file fc_core.h.

Referenced by event().

◆ batt_monitor

uint8_t fc_config_t::batt_monitor

a BattTask measures the battery

Definition at line 78 of file fc_core.h.

Referenced by batt_unusable(), battery(), fc_init(), and publish().

◆ usb_host

uint8_t(* fc_config_t::usb_host) (void)

1 while a USB host is connected: ARM, TAKEOFF and MOTOR_TEST are refused (USB_CONNECTED, ADR 0009); may be NULL (no USB)

Definition at line 81 of file fc_core.h.

Referenced by exec().


The documentation for this struct was generated from the following file: