mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 01:05:21 +03:00
fix hdzero channel settings over displayport
This commit is contained in:
parent
df543ff1d7
commit
a2a05629a0
1 changed files with 23 additions and 0 deletions
|
@ -2581,6 +2581,29 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
|
||||||
if (sbufBytesRemaining(src) > 0) {
|
if (sbufBytesRemaining(src) > 0) {
|
||||||
vtxSettingsConfigMutable()->lowPowerDisarm = sbufReadU8(src);
|
vtxSettingsConfigMutable()->lowPowerDisarm = sbufReadU8(src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// //////////////////////////////////////////////////////////
|
||||||
|
// this code is taken from BF, it's hack for HDZERO VTX MSP frame
|
||||||
|
// API version 1.42 - this parameter kept separate since clients may already be supplying
|
||||||
|
if (sbufBytesRemaining(src) >= 2) {
|
||||||
|
sbufReadU16(src); //skip pitModeFreq
|
||||||
|
}
|
||||||
|
|
||||||
|
// API version 1.42 - extensions for non-encoded versions of the band, channel or frequency
|
||||||
|
if (sbufBytesRemaining(src) >= 4) {
|
||||||
|
uint8_t newBand = sbufReadU8(src);
|
||||||
|
const uint8_t newChannel = sbufReadU8(src);
|
||||||
|
vtxSettingsConfigMutable()->band = newBand;
|
||||||
|
vtxSettingsConfigMutable()->channel = newChannel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if (sbufBytesRemaining(src) >= 4) {
|
||||||
|
sbufRead8(src); // freq_l
|
||||||
|
sbufRead8(src); // freq_h
|
||||||
|
sbufRead8(src); // band count
|
||||||
|
sbufRead8(src); // channel count
|
||||||
|
}*/
|
||||||
|
// //////////////////////////////////////////////////////////
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue