Skip to content

Commit

Permalink
Merge branch 'master' into gov_min_throttle
Browse files Browse the repository at this point in the history
  • Loading branch information
rotorflight authored Oct 16, 2024
2 parents 1cdef47 + 68f0af0 commit 5af2e9e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main/msp/msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,15 @@ static bool mspCommonProcessOutCommand(int16_t cmdMSP, sbuf_t *dst, mspPostProce
break;
}

case MSP_EXPERIMENTAL:
/*
* Send your experimental parameters to LUA. Like:
*
* sbufWriteU8(dst, currentPidProfile->yourFancyParameterA);
* sbufWriteU8(dst, currentPidProfile->yourFancyParameterB);
*/
break;

default:
return false;
}
Expand Down Expand Up @@ -3527,6 +3536,17 @@ static mspResult_e mspCommonProcessInCommand(mspDescriptor_t srcDesc, int16_t cm
break;
#endif // OSD

case MSP_SET_EXPERIMENTAL:
/*
* Receive your experimental parameters from LUA. Like:
*
* if (sbufBytesRemaining(src) >= 2) {
* currentPidProfile->yourFancyParameterA = sbufReadU8(src);
* currentPidProfile->yourFancyParameterB = sbufReadU8(src);
* }
*/
break;

default:
return mspProcessInCommand(srcDesc, cmdMSP, src);
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/msp/msp_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@
#define MSP_LED_STRIP_SETTINGS 150
#define MSP_SET_LED_STRIP_SETTINGS 151

#define MSP_EXPERIMENTAL 158
#define MSP_SET_EXPERIMENTAL 159

#define MSP_UID 160

#define MSP_GPSSVINFO 164
Expand Down

0 comments on commit 5af2e9e

Please sign in to comment.