mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
started merging in generic servo handler
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@422 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
2272e1a5a6
commit
7c595e4110
4 changed files with 25 additions and 14 deletions
|
@ -159,6 +159,7 @@ void checkFirstTime(bool reset)
|
|||
static void resetConf(void)
|
||||
{
|
||||
int i;
|
||||
int8_t servoRates[8] = { 30, 30, 100, 100, 100, 100, 100, 100 };
|
||||
|
||||
// Clear all configuration
|
||||
memset(&mcfg, 0, sizeof(master_t));
|
||||
|
@ -276,6 +277,13 @@ static void resetConf(void)
|
|||
cfg.failsafe_detect_threshold = 985; // any of first 4 channels below this value will trigger failsafe
|
||||
|
||||
// servos
|
||||
for (i = 0; i < 8; i++) {
|
||||
cfg.servoConf[i].min = 1020;
|
||||
cfg.servoConf[i].max = 2000;
|
||||
cfg.servoConf[i].middle = 1500;
|
||||
cfg.servoConf[i].rate = servoRates[i];
|
||||
}
|
||||
|
||||
cfg.yaw_direction = 1;
|
||||
cfg.tri_unarmed_servo = 1;
|
||||
cfg.tri_yaw_middle = 1500;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue