Skip to content

Commit

Permalink
displayport_hdzero_osd: drop MSP_SET_VTXTABLE_BAND/POWERLEVEL
Browse files Browse the repository at this point in the history
Emuflight does not implement vtx tables and that causes corruption on
certain hdzero firmware. Everything seems smooth as Buttercake
  • Loading branch information
saidinesh5 committed Jul 29, 2022
1 parent 6461502 commit 3b2c3c7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/io/displayport_hdzero_osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,25 @@ static mspResult_e hdZeroProcessMspCommand(mspPacket_t *cmd, mspPacket_t *reply,
vtxSeen = vtxActive = true;
vtxHeartbeat = millis();

sbuf_t *dst = &reply->buf;
sbuf_t *src = &cmd->buf;
const uint8_t cmdMSP = cmd->cmd;
reply->cmd = cmd->cmd;
if (cmdMSP == MSP_FC_VARIANT) {
//We advertise as ARDU on this port for the prettier font
sbufWriteData(dst, "ARDU", FLIGHT_CONTROLLER_IDENTIFIER_LENGTH);
return MSP_RESULT_ACK;
}

// #define MSP_SET_VTXTABLE_BAND 227
// #define MSP_SET_VTXTABLE_POWERLEVEL 228
// MSP_IMUF_CONFIG 227 -> MSP_SET_VTXTABLE_BAND (in betaflight)
// MSP_SET_IMUF_CONFIG 228 -> MSP_SET_VTXTABLE_POWERLEVEL (in betaflight)
if (cmdMSP == 227 || cmdMSP == 228) {
// We don't have VTX Tables so we just drop the packet and send ACK
return MSP_RESULT_ACK;
}

// Process MSP command
return mspProcessCommand(cmd, reply, mspPostProcessFn);
}
Expand Down

0 comments on commit 3b2c3c7

Please sign in to comment.