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

[mspv2] pass "flags" field back to sender, define ILMI flag #10464

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions src/main/fc/fc_msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2717,7 +2717,7 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
vtxSettingsConfigMutable()->lowPowerDisarm = sbufReadU8(src);
}

// API version 1.42 - extension for pitmode frequency
// API version 1.42 - extension for pitmode frequency
if (sbufBytesRemaining(src) >= 2) {
sbufReadU16(src); //skip pitModeFreq
}
Expand All @@ -2738,15 +2738,15 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
if (sbufBytesRemaining(src) >= 2) {
sbufReadU16(src); // freq
}

if (sbufBytesRemaining(src) >= 3) {
sbufReadU8(src); // band count
sbufReadU8(src); // channel count

uint8_t newPowerCount = sbufReadU8(src);
if (newPowerCount > 0 && newPowerCount < (vtxDevice->capability.powerCount)) {
vtxDevice->capability.powerCount = newPowerCount;
}
}
}
}
}
Expand Down Expand Up @@ -2944,7 +2944,7 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
if (sublinkID == 0) {
rxLinkStatistics.uplinkTXPower = sbufReadU16(src);
rxLinkStatistics.downlinkTXPower = sbufReadU16(src);

for (int i = 0; i < 4; i++) {
rxLinkStatistics.band[i] = sbufReadU8(src);
}
Expand Down Expand Up @@ -4249,7 +4249,7 @@ mspResult_e mspFcProcessCommand(mspPacket_t *cmd, mspPacket_t *reply, mspPostPro
if (cmd->flags & MSP_FLAG_DONT_REPLY) {
ret = MSP_RESULT_NO_REPLY;
}

reply->flags = cmd->flags;
reply->result = ret;
return ret;
}
Expand Down
1 change: 1 addition & 0 deletions src/main/msp/msp.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ typedef struct mspPacket_s {

typedef enum {
MSP_FLAG_DONT_REPLY = (1 << 0),
MSP_FLAG_ILMI = (1 << 1), // "In-Line Message identifier"
} mspFlags_e;

struct serialPort_s;
Expand Down
Loading