mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +03:00
added printf() support via SpareTimeLabs printf lib. this cleaned up some mess inside cli.c
example of usage: http://bcas.tv/paste/results/xToE9w26.html hover-tested quadx loaded as custom mix, works. git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@207 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
98cba890e1
commit
3cd8e4e3f6
10 changed files with 3543 additions and 2840 deletions
19
src/mixer.c
19
src/mixer.c
|
@ -108,7 +108,7 @@ static const motorMixer_t mixerVtail4[] = {
|
|||
};
|
||||
|
||||
// Keep this synced with MultiType struct in mw.h!
|
||||
static const mixer_t mixers[] = {
|
||||
const mixer_t mixers[] = {
|
||||
// Mo Se Mixtable
|
||||
{ 0, 0, NULL }, // entry 0
|
||||
{ 3, 1, mixerTri }, // MULTITYPE_TRI
|
||||
|
@ -160,6 +160,23 @@ void mixerInit(void)
|
|||
}
|
||||
}
|
||||
|
||||
void mixerLoadMix(int index)
|
||||
{
|
||||
int i;
|
||||
|
||||
// we're 1-based
|
||||
index++;
|
||||
// clear existing
|
||||
for (i = 0; i < MAX_MOTORS; i++)
|
||||
cfg.customMixer[i].throttle = 0.0f;
|
||||
|
||||
// do we have anything here to begin with?
|
||||
if (mixers[index].motor != NULL) {
|
||||
for (i = 0; i < mixers[index].numberMotor; i++)
|
||||
cfg.customMixer[i] = mixers[index].motor[i];
|
||||
}
|
||||
}
|
||||
|
||||
void writeServos(void)
|
||||
{
|
||||
if (!useServo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue