mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
added support for outputting FrSky telemetry by silpstream @ rcgroups
feature TELEMETRY to enable it. when armed, telemetry is sent out the TX pin. It must be connected to 'Rx' pin of FrSky telemetry receiver via a level shifter. When disarmed, port goes back to 115200 bps for GUI. fixed a typo in imu.c introduced by GYRO_INTERLEAVE junk. todo: just switch serial speed instead of reinitializing everything. git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@173 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
9c2204c179
commit
c998f5ca67
12 changed files with 5031 additions and 4769 deletions
|
@ -70,6 +70,7 @@ static const char pidnames[] =
|
|||
|
||||
static uint8_t checksum, indRX, inBuf[INBUF_SIZE];
|
||||
static uint8_t cmdMSP;
|
||||
static bool guiConnected = false;
|
||||
|
||||
void serialize32(uint32_t a)
|
||||
{
|
||||
|
@ -396,6 +397,7 @@ void serialCom(void)
|
|||
indRX = 0;
|
||||
checksum ^= c;
|
||||
c_state = HEADER_SIZE; // the command is to follow
|
||||
guiConnected = true;
|
||||
} else if (c_state == HEADER_SIZE) {
|
||||
cmdMSP = c;
|
||||
checksum ^= c;
|
||||
|
@ -410,4 +412,8 @@ void serialCom(void)
|
|||
c_state = IDLE;
|
||||
}
|
||||
}
|
||||
if (!cliMode && !uartAvailable() && feature(FEATURE_TELEMETRY) && f.ARMED) { //The first 2 conditions should never evaluate to true but I'm putting it here anyway - silpstream
|
||||
sendTelemetry();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue