mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 06:45:16 +03:00
Merge pull request #2628 from mikeller/fix_kroozx_target
Made KROOZX target PG aware.
This commit is contained in:
commit
b68bf5ae8c
1 changed files with 14 additions and 8 deletions
|
@ -20,7 +20,13 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
#include "config/config_master.h"
|
#include "common/axis.h"
|
||||||
|
|
||||||
|
#include "sensors/battery.h"
|
||||||
|
#include "sensors/barometer.h"
|
||||||
|
#include "sensors/compass.h"
|
||||||
|
|
||||||
|
#include "io/osd.h"
|
||||||
|
|
||||||
#define VBAT_SCALE 113
|
#define VBAT_SCALE 113
|
||||||
#define CURRENT_SCALE 1000
|
#define CURRENT_SCALE 1000
|
||||||
|
@ -29,13 +35,13 @@
|
||||||
#define OSD_POS(x,y) (x | (y << 5))
|
#define OSD_POS(x,y) (x | (y << 5))
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
#ifdef TARGET_CONFIG
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(void)
|
||||||
{
|
{
|
||||||
config->batteryConfig.vbatscale = VBAT_SCALE;
|
batteryConfigMutable()->vbatscale = VBAT_SCALE;
|
||||||
config->batteryConfig.currentMeterScale = CURRENT_SCALE;
|
batteryConfigMutable()->currentMeterScale = CURRENT_SCALE;
|
||||||
config->batteryConfig.currentMeterOffset = CURRENT_OFFSET;
|
batteryConfigMutable()->currentMeterOffset = CURRENT_OFFSET;
|
||||||
config->barometerConfig.baro_hardware = 0;
|
barometerConfigMutable()->baro_hardware = 0;
|
||||||
config->compassConfig.mag_hardware = 0;
|
compassConfigMutable()->mag_hardware = 0;
|
||||||
config->osdConfig.item_pos[OSD_MAIN_BATT_VOLTAGE] = OSD_POS(12, 1) | VISIBLE_FLAG;
|
osdConfigMutable()->item_pos[OSD_MAIN_BATT_VOLTAGE] = OSD_POS(12, 1) | VISIBLE_FLAG;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue