Skip to content

Commit

Permalink
vtx: update pitmode first
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed Jun 20, 2024
1 parent ce1ca67 commit a062004
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/io/vtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,15 @@ void vtx_update() {
}
}

if (!vtx_update_frequency()) {
if (!vtx_update_pitmode()) {
return;
}

if (!vtx_update_powerlevel()) {
if (!vtx_update_frequency()) {
return;
}

if (!vtx_update_pitmode()) {
if (!vtx_update_powerlevel()) {
return;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/io/vtx_smartaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ void smart_audio_set_pit_mode(vtx_pit_mode_t pit_mode) {
uint8_t mode = 0x0;

if (pit_mode == VTX_PIT_MODE_OFF) {
mode |= 0x04;
mode |= 0x08;
} else if (pit_mode == VTX_PIT_MODE_ON) {
// out-range was dropped for VTXes with SA >= v2.1
mode |= 0x01;
mode |= 0x09;
}

serial_smart_audio_send_payload(SA_CMD_SET_MODE, &mode, 1);
Expand Down

0 comments on commit a062004

Please sign in to comment.