1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 01:35:35 +03:00

Merge pull request #3429 from iNavFlight/agh_vtx_settings_fixes

Fix VTX device type reported via MSP
This commit is contained in:
Alberto García Hierro 2018-06-24 20:28:10 +01:00 committed by GitHub
commit bc1d46d5cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1278,8 +1278,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
vtxDevice_t *vtxDevice = vtxCommonDevice();
if (vtxDevice) {
uint8_t deviceType = 0;
vtxCommonGetDeviceType(vtxDevice);
uint8_t deviceType = vtxCommonGetDeviceType(vtxDevice);
// Return band, channel and power from vtxSettingsConfig_t
// since the VTX might be configured but temporarily offline.
@ -1292,7 +1291,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
sbufWriteU8(dst, vtxSettingsConfig()->power);
sbufWriteU8(dst, pitmode);
// Betaflight doesn't send these fields
// Betaflight < 4 doesn't send these fields
sbufWriteU8(dst, vtxCommonDeviceIsReady(vtxDevice) ? 1 : 0);
sbufWriteU8(dst, vtxSettingsConfig()->lowPowerDisarm);
// future extensions here...