mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Merge pull request #3626 from basdelfos/msp_beeper_config
Add MSP_BEEPER_CONFIG and MSP_SET_BEEPER_CONFIG for beeper configuration
This commit is contained in:
commit
c750918e8b
2 changed files with 16 additions and 0 deletions
|
@ -457,6 +457,12 @@ static bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProce
|
|||
sbufWriteU32(dst, featureMask());
|
||||
break;
|
||||
|
||||
#ifdef BEEPER
|
||||
case MSP_BEEPER_CONFIG:
|
||||
sbufWriteU32(dst, getBeeperOffMask());
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MSP_BATTERY_STATE: {
|
||||
// battery characteristics
|
||||
sbufWriteU8(dst, (uint8_t)constrain(getBatteryCellCount(), 0, 255)); // 0 indicates battery not detected.
|
||||
|
@ -1709,6 +1715,13 @@ static mspResult_e mspFcProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
|
|||
featureSet(sbufReadU32(src)); // features bitmap
|
||||
break;
|
||||
|
||||
#ifdef BEEPER
|
||||
case MSP_SET_BEEPER_CONFIG:
|
||||
beeperOffClearAll();
|
||||
setBeeperOffMask(sbufReadU32(src));
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MSP_SET_BOARD_ALIGNMENT_CONFIG:
|
||||
boardAlignmentMutable()->rollDegrees = sbufReadU16(src);
|
||||
boardAlignmentMutable()->pitchDegrees = sbufReadU16(src);
|
||||
|
|
|
@ -223,6 +223,9 @@
|
|||
// External OSD displayport mode messages
|
||||
#define MSP_DISPLAYPORT 182
|
||||
|
||||
#define MSP_BEEPER_CONFIG 184
|
||||
#define MSP_SET_BEEPER_CONFIG 185
|
||||
|
||||
//
|
||||
// Multwii original MSP commands
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue