mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Corrected VTX vtables to not use static device handle
This commit is contained in:
parent
f000d7bf10
commit
e2683cd2dc
14 changed files with 259 additions and 281 deletions
|
@ -588,7 +588,8 @@ static void applyLedVtxLayer(bool updateNow, timeUs_t *timer)
|
|||
static uint16_t lastCheck = 0;
|
||||
static bool blink = false;
|
||||
|
||||
if (!vtxCommonDeviceRegistered()) {
|
||||
const vtxDevice_t *vtxDevice = vtxCommonDevice();
|
||||
if (!vtxDevice) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -597,9 +598,9 @@ static void applyLedVtxLayer(bool updateNow, timeUs_t *timer)
|
|||
|
||||
if (updateNow) {
|
||||
// keep counter running, so it stays in sync with vtx
|
||||
vtxCommonGetBandAndChannel(&band, &channel);
|
||||
vtxCommonGetPowerIndex(&power);
|
||||
vtxCommonGetPitMode(&pit);
|
||||
vtxCommonGetBandAndChannel(vtxDevice, &band, &channel);
|
||||
vtxCommonGetPowerIndex(vtxDevice, &power);
|
||||
vtxCommonGetPitMode(vtxDevice, &pit);
|
||||
|
||||
frequency = vtx58frequencyTable[band - 1][channel - 1]; //subtracting 1 from band and channel so that correct frequency is returned.
|
||||
//might not be correct for tramp but should fix smart audio.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue