mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
MSP LOOP_TIME commands for Configurator 0.66
This commit is contained in:
parent
421f0b81e0
commit
fe89535126
1 changed files with 10 additions and 0 deletions
|
@ -93,6 +93,7 @@ static serialPort_t *mspSerialPort;
|
|||
|
||||
extern uint16_t cycleTime; // FIXME dependency on mw.c
|
||||
extern uint16_t rssi; // FIXME dependency on mw.c
|
||||
extern uint32_t targetLooptime;
|
||||
|
||||
void useRcControlsConfig(modeActivationCondition_t *modeActivationConditions, escAndServoConfig_t *escAndServoConfigToUse, pidProfile_t *pidProfileToUse);
|
||||
|
||||
|
@ -226,6 +227,9 @@ static const char * const boardIdentifier = TARGET_BOARD_IDENTIFIER;
|
|||
#define MSP_DATAFLASH_READ 71 //out message - get content of dataflash chip
|
||||
#define MSP_DATAFLASH_ERASE 72 //in message - erase dataflash chip
|
||||
|
||||
#define MSP_LOOP_TIME 73 //out message Returns FC cycle time i.e looptime parameter
|
||||
#define MSP_SET_LOOP_TIME 74 //in message Sets FC cycle time i.e looptime parameter
|
||||
|
||||
#define MSP_FAILSAFE_CONFIG 75 //out message Returns FC Fail-Safe settings
|
||||
#define MSP_SET_FAILSAFE_CONFIG 76 //in message Sets FC Fail-Safe settings
|
||||
|
||||
|
@ -927,6 +931,10 @@ static bool processOutCommand(uint8_t cmdMSP)
|
|||
serialize8(masterConfig.auto_disarm_delay);
|
||||
serialize8(masterConfig.disarm_kill_switch);
|
||||
break;
|
||||
case MSP_LOOP_TIME:
|
||||
headSerialReply(2);
|
||||
serialize16((uint16_t)targetLooptime);
|
||||
break;
|
||||
case MSP_RC_TUNING:
|
||||
headSerialReply(11);
|
||||
serialize8(currentControlRateProfile->rcRate8);
|
||||
|
@ -1348,6 +1356,8 @@ static bool processInCommand(void)
|
|||
masterConfig.auto_disarm_delay = read8();
|
||||
masterConfig.disarm_kill_switch = read8();
|
||||
break;
|
||||
case MSP_SET_LOOP_TIME:
|
||||
break;
|
||||
case MSP_SET_PID_CONTROLLER:
|
||||
currentProfile->pidProfile.pidController = read8();
|
||||
pidSetController(currentProfile->pidProfile.pidController);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue