Skip to content

Commit

Permalink
Add ability to read Programming PID status via MSP
Browse files Browse the repository at this point in the history
  • Loading branch information
DzikuVx committed Feb 21, 2021
1 parent 8f5ac3e commit 67572fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/main/fc/fc_msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,11 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
sbufWriteU16(dst, programmingPids(i)->gains.FF);
}
break;
case MSP2_INAV_PROGRAMMING_PID_STATUS:
for (int i = 0; i < MAX_PROGRAMMING_PID_COUNT; i++) {
sbufWriteU32(dst, programmingPidGetOutput(i));
}
break;
#endif
case MSP2_COMMON_MOTOR_MIXER:
for (uint8_t i = 0; i < MAX_SUPPORTED_MOTORS; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/msp/msp_protocol_v2_inav.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#define MSP2_INAV_GVAR_STATUS 0x2027
#define MSP2_INAV_PROGRAMMING_PID 0x2028
#define MSP2_INAV_SET_PROGRAMMING_PID 0x2029
#define MSP2_INAV_PROGRAMMING_PID_STATUS 0x202A

#define MSP2_PID 0x2030
#define MSP2_SET_PID 0x2031
Expand All @@ -79,4 +80,3 @@
#define MSP2_INAV_SET_SAFEHOME 0x2039

#define MSP2_INAV_MISC2 0x203A

0 comments on commit 67572fe

Please sign in to comment.