Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve #555; DJIwarning only if OSD defined #559

Closed
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
4 changes: 3 additions & 1 deletion src/main/interface/msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,11 +767,13 @@ bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst) {
break;
case MSP_NAME: {
// Show warning for DJI OSD instead of pilot name
// works if osd warnings enabled, osd_warn_dji is on and usb is not connected
// works if osd warnings enabled, osd_warn_dji is on
#ifdef USE_OSD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be okay, however, if the FC does not have an analog OSD chip, it still technically could perform DJI OSD functions. But DJI custom osd would not work without enabling USE_OSD. I feel like theres a small user base that would lose DJI OSD on these FCs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting. i don't know how to resolve such.

if (osdWarnGetState(OSD_WARNING_DJI)) {
sbufWriteString(dst, djiWarningBuffer);
break;
}
#endif
const int nameLen = strlen(pilotConfig()->name);
for (int i = 0; i < nameLen; i++) {
sbufWriteU8(dst, pilotConfig()->name[i]);
Expand Down