Skip to content

Commit

Permalink
[mspv2] pass "flags" field back to sender, define ILMI flag (#10464)
Browse files Browse the repository at this point in the history
  • Loading branch information
stronnag authored Nov 13, 2024
1 parent 180d337 commit 9fb51e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
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

0 comments on commit 9fb51e0

Please sign in to comment.