mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
Added PG config definitions 1
This commit is contained in:
parent
90393d5a12
commit
0bca49d8c4
12 changed files with 281 additions and 79 deletions
|
@ -47,6 +47,22 @@
|
|||
magDev_t magDev;
|
||||
mag_t mag; // mag access functions
|
||||
|
||||
#ifdef MAG_INT_EXTI
|
||||
#define COMPASS_INTERRUPT_TAG IO_TAG(MAG_INT_EXTI)
|
||||
#else
|
||||
#define COMPASS_INTERRUPT_TAG IO_TAG_NONE
|
||||
#endif
|
||||
|
||||
PG_REGISTER_WITH_RESET_TEMPLATE(compassConfig_t, compassConfig, PG_COMPASS_CONFIG, 0);
|
||||
|
||||
PG_RESET_TEMPLATE(compassConfig_t, compassConfig,
|
||||
.mag_align = ALIGN_DEFAULT,
|
||||
// xxx_hardware: 0:default/autodetect, 1: disable
|
||||
.mag_hardware = 1,
|
||||
.mag_declination = 0,
|
||||
.interruptTag = COMPASS_INTERRUPT_TAG
|
||||
);
|
||||
|
||||
#ifdef MAG
|
||||
|
||||
static int16_t magADCRaw[XYZ_AXIS_COUNT];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue