mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
fixed buzzer on rev5 boards;
added experimental gyro-based headfree boxes git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@429 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
800ce6bdf7
commit
3bb1063001
6 changed files with 3142 additions and 3096 deletions
14
src/serial.c
14
src/serial.c
|
@ -267,6 +267,7 @@ void serializeBoxNamesReply(void)
|
|||
void serialInit(uint32_t baudrate)
|
||||
{
|
||||
int idx;
|
||||
bool hfadded = false;
|
||||
|
||||
core.mainport = uartOpen(USART1, NULL, baudrate, MODE_RXTX);
|
||||
// TODO fix/hax
|
||||
|
@ -279,6 +280,10 @@ void serialInit(uint32_t baudrate)
|
|||
if (sensors(SENSOR_ACC)) {
|
||||
availableBoxes[idx++] = BOXANGLE;
|
||||
availableBoxes[idx++] = BOXHORIZON;
|
||||
availableBoxes[idx++] = BOXMAG;
|
||||
availableBoxes[idx++] = BOXHEADFREE;
|
||||
availableBoxes[idx++] = BOXHEADADJ;
|
||||
hfadded = true;
|
||||
}
|
||||
if (sensors(SENSOR_BARO)) {
|
||||
availableBoxes[idx++] = BOXBARO;
|
||||
|
@ -286,9 +291,12 @@ void serialInit(uint32_t baudrate)
|
|||
availableBoxes[idx++] = BOXVARIO;
|
||||
}
|
||||
if (sensors(SENSOR_MAG)) {
|
||||
availableBoxes[idx++] = BOXMAG;
|
||||
availableBoxes[idx++] = BOXHEADFREE;
|
||||
availableBoxes[idx++] = BOXHEADADJ;
|
||||
// this really shouldn't even needed to be tested as it wouldn't be possible without acc anyway
|
||||
if (!hfadded) {
|
||||
availableBoxes[idx++] = BOXMAG;
|
||||
availableBoxes[idx++] = BOXHEADFREE;
|
||||
availableBoxes[idx++] = BOXHEADADJ;
|
||||
}
|
||||
}
|
||||
if (feature(FEATURE_SERVO_TILT))
|
||||
availableBoxes[idx++] = BOXCAMSTAB;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue