1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 06:45:16 +03:00

Add cli 'motor' command

It allows to get and set single motor output
value.
This commit is contained in:
Davide Bertola 2013-11-01 11:28:29 +01:00
parent 639f534c31
commit 786d727705
2 changed files with 52 additions and 2 deletions

View file

@ -3,6 +3,7 @@
static uint8_t numberMotor = 0;
int16_t motor[MAX_MOTORS];
int16_t motor_disarmed[MAX_MOTORS];
int16_t servo[MAX_SERVOS] = { 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500 };
static motorMixer_t currentMixer[MAX_MOTORS];
@ -192,6 +193,11 @@ void mixerInit(void)
}
}
}
// set disarmed motor values
for (i = 0; i < MAX_MOTORS; i++) {
motor_disarmed[i] = feature(FEATURE_3D) ? mcfg.neutral3d : mcfg.mincommand;
}
}
void mixerLoadMix(int index)
@ -436,7 +442,8 @@ void mixTable(void)
motor[i] = mcfg.mincommand;
}
}
if (!f.ARMED)
motor[i] = feature(FEATURE_3D) ? mcfg.neutral3d : mcfg.mincommand;
if (!f.ARMED) {
motor[i] = motor_disarmed[i];
}
}
}