mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Add missing variable initialization in MSP_VTX_CONFIG
If the `vtxDevice` was not valid then the `vtxStatus` variable never got initialized but was still used in the pit mode flag determination - leading to random behavior.
This commit is contained in:
parent
2a18209492
commit
ad4d46a1f9
1 changed files with 1 additions and 1 deletions
|
@ -1676,7 +1676,7 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
||||||
case MSP_VTX_CONFIG:
|
case MSP_VTX_CONFIG:
|
||||||
{
|
{
|
||||||
const vtxDevice_t *vtxDevice = vtxCommonDevice();
|
const vtxDevice_t *vtxDevice = vtxCommonDevice();
|
||||||
unsigned vtxStatus;
|
unsigned vtxStatus = 0;
|
||||||
vtxDevType_e vtxType = VTXDEV_UNKNOWN;
|
vtxDevType_e vtxType = VTXDEV_UNKNOWN;
|
||||||
uint8_t deviceIsReady = 0;
|
uint8_t deviceIsReady = 0;
|
||||||
if (vtxDevice) {
|
if (vtxDevice) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue