Skip to content

Commit

Permalink
Merge branch 'master' into universal-binding
Browse files Browse the repository at this point in the history
  • Loading branch information
CapnBry committed Jan 24, 2024
2 parents 6e152fa + 212361b commit 6431f1f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/lib/MSPVTX/devMSPVTX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static uint8_t checkingIndex = 0;
static uint8_t pitMode = 0;
static uint8_t power = 0;
static uint8_t channel = 0;
static uint8_t mspState = GET_VTX_TABLE_SIZE;
static uint8_t mspState = STOP_MSPVTX;

static void sendCrsfMspToFC(uint8_t *mspFrame, uint8_t mspFrameSize)
{
Expand Down Expand Up @@ -352,6 +352,14 @@ void disableMspVtx(void)
mspState = STOP_MSPVTX;
}

static void initialize()
{
if (OPT_HAS_VTX_SPI)
{
mspState = GET_VTX_TABLE_SIZE;
}
}

static int event(void)
{
if (GPIO_PIN_SPI_VTX_NSS == UNDEF_PIN)
Expand Down Expand Up @@ -379,8 +387,8 @@ static int timeout(void)
}

device_t MSPVTx_device = {
.initialize = NULL,
.start = NULL,
.initialize = initialize,
.start = nullptr,
.event = event,
.timeout = timeout
};
Expand Down

0 comments on commit 6431f1f

Please sign in to comment.