Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/msp_displayport.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,10 @@ void msp_cmd_tx() {
msp_send_cmd_tx(MSP_FC_VARIANT);
} else if ((fc_lock & FC_VTX_CONFIG_LOCK) == 0) {
msp_send_cmd_tx(MSP_GET_VTX_CONFIG);
msp_send_cmd_tx(MSP_STATUS);
if (!g_IS_ARMED) {
msp_send_cmd_tx(MSP_RC);
}
} else {
fc_lock |= FC_STARTUP_LOCK;

Expand Down Expand Up @@ -1052,6 +1056,8 @@ void parse_status() {
camera_switch(1);
}

g_IS_ARMED = (msp_rx_buf[6] & 0x01);

#if (0)
g_IS_PARALYZE = (msp_rx_buf[9] & 0x80);

Expand Down Expand Up @@ -1113,6 +1119,9 @@ void parse_rc() {
yaw = (msp_rx_buf[5] << 8) | msp_rx_buf[4];
throttle = (msp_rx_buf[7] << 8) | msp_rx_buf[6];

if (msp_cmp_fc_variant("ARDU"))
pitch = 3000 - pitch;

update_cms_menu(roll, pitch, yaw, throttle);
}

Expand Down Expand Up @@ -1314,11 +1323,19 @@ void parse_vtx_params(uint8_t isMSP_V2) {
}

void parse_vtx_config(void) {
if (!msp_cmp_fc_variant("BTFL") && !msp_cmp_fc_variant("EMUF") && !msp_cmp_fc_variant("QUIC") && !msp_cmp_fc_variant("INAV")) {
return;
}

fc_lock |= FC_VTX_CONFIG_LOCK;
parse_vtx_params(0);
}

void parseMspVtx_V2(void) {
if (!msp_cmp_fc_variant("BTFL") && !msp_cmp_fc_variant("EMUF") && !msp_cmp_fc_variant("QUIC") && !msp_cmp_fc_variant("INAV")) {
return;
}

if (fc_lock & FC_VTX_CONFIG_LOCK) {
parse_vtx_params(1);
}
Expand Down