diff --git a/src/main/msp/msp.c b/src/main/msp/msp.c index 7a3092fd8a..46beec7f2d 100644 --- a/src/main/msp/msp.c +++ b/src/main/msp/msp.c @@ -1050,6 +1050,9 @@ static bool mspCommonProcessOutCommand(int16_t cmdMSP, sbuf_t *dst, mspPostProce // API >= 1.46 sbufWriteU16(dst, osdConfig()->link_quality_alarm); + // API >= 1.47 + sbufWriteU16(dst, osdConfig()->rssi_dbm_alarm); + break; } #endif // USE_OSD @@ -4262,6 +4265,11 @@ static mspResult_e mspCommonProcessInCommand(mspDescriptor_t srcDesc, int16_t cm osdConfigMutable()->link_quality_alarm = sbufReadU16(src); } + if (sbufBytesRemaining(src) >= 2) { + // API >= 1.47 + osdConfigMutable()->rssi_dbm_alarm = sbufReadU16(src); + } + } else if ((int8_t)addr == -2) { // Timers uint8_t index = sbufReadU8(src); diff --git a/src/main/msp/msp_protocol.h b/src/main/msp/msp_protocol.h index c776ce3dba..36a629641c 100644 --- a/src/main/msp/msp_protocol.h +++ b/src/main/msp/msp_protocol.h @@ -62,7 +62,7 @@ #define MSP_PROTOCOL_VERSION 0 #define API_VERSION_MAJOR 1 // increment when major changes are made -#define API_VERSION_MINOR 46 // increment after a release, to set the version for all changes to go into the following release (if no changes to MSP are made between the releases, this can be reverted before the release) +#define API_VERSION_MINOR 47 // increment after a release, to set the version for all changes to go into the following release (if no changes to MSP are made between the releases, this can be reverted before the release) #define API_VERSION_LENGTH 2 diff --git a/src/test/unit/rx_spi_expresslrs_telemetry_unittest.cc b/src/test/unit/rx_spi_expresslrs_telemetry_unittest.cc index 2221b09d63..a94a2ce6ac 100644 --- a/src/test/unit/rx_spi_expresslrs_telemetry_unittest.cc +++ b/src/test/unit/rx_spi_expresslrs_telemetry_unittest.cc @@ -222,7 +222,7 @@ TEST(RxSpiExpressLrsTelemetryUnitTest, TestFlightMode) TEST(RxSpiExpressLrsTelemetryUnitTest, TestMspVersionRequest) { uint8_t request[15] = {238, 12, 122, 200, 234, 48, 0, 1, 1, 0, 0, 0, 0, 128, 0}; - uint8_t response[12] = {200, 10, 123, 234, 200, 48, 3, 1, 0, API_VERSION_MAJOR, API_VERSION_MINOR, 0x55}; + uint8_t response[12] = {200, 10, 123, 234, 200, 48, 3, 1, 0, API_VERSION_MAJOR, API_VERSION_MINOR, 0x80}; uint8_t data1[6] = {1, request[0], request[1], request[2], request[3], request[4]}; uint8_t data2[6] = {2, request[5], request[6], request[7], request[8], request[9]}; uint8_t data3[6] = {3, request[10], request[11], request[12], request[13], request[14]};