mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
added configurable motor and servo period settings (50-498Hz). both set by cli, default is 50 for servo, 400 for motors.
removed feature digital_servo since its now set by cli instead. added proper tx end check into uart, to remove delay inside printing out set values and tx buffer overrun during help() instead of passing a bunch of params to pwm driver, made a config struct fixed a bug in gps baudrate fixed typo in stmloader.c whitespace / indentation cleanups in various drivers git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@137 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
97cdebfb13
commit
58eb2b966f
16 changed files with 2645 additions and 2619 deletions
14
src/config.c
14
src/config.c
|
@ -13,12 +13,12 @@ config_t cfg;
|
|||
const char rcChannelLetters[] = "AERT1234";
|
||||
|
||||
static uint32_t enabledSensors = 0;
|
||||
static uint8_t checkNewConf = 10;
|
||||
static uint8_t checkNewConf = 11;
|
||||
|
||||
void parseRcChannels(const char *input)
|
||||
{
|
||||
const char *c, *s;
|
||||
|
||||
|
||||
for (c = input; *c; c++) {
|
||||
s = strchr(rcChannelLetters, *c);
|
||||
if (s)
|
||||
|
@ -39,7 +39,7 @@ void readEEPROM(void)
|
|||
|
||||
for (i = 0; i < 7; i++)
|
||||
lookupRX[i] = (2500 + cfg.rcExpo8 * (i * i - 25)) * i * (int32_t) cfg.rcRate8 / 1250;
|
||||
|
||||
|
||||
cfg.wing_left_mid = constrain(cfg.wing_left_mid, WING_LEFT_MIN, WING_LEFT_MAX); //LEFT
|
||||
cfg.wing_right_mid = constrain(cfg.wing_right_mid, WING_RIGHT_MIN, WING_RIGHT_MAX); //RIGHT
|
||||
cfg.tri_yaw_middle = constrain(cfg.tri_yaw_middle, TRI_YAW_CONSTRAINT_MIN, TRI_YAW_CONSTRAINT_MAX); //REAR
|
||||
|
@ -49,7 +49,7 @@ void writeParams(void)
|
|||
{
|
||||
FLASH_Status status;
|
||||
uint32_t i;
|
||||
|
||||
|
||||
FLASH_Unlock();
|
||||
|
||||
FLASH_ClearFlag(FLASH_FLAG_EOP | FLASH_FLAG_PGERR | FLASH_FLAG_WRPRTERR);
|
||||
|
@ -124,7 +124,7 @@ void checkFirstTime(bool reset)
|
|||
cfg.vbatmaxcellvoltage = 43;
|
||||
cfg.vbatmincellvoltage = 33;
|
||||
|
||||
// Radio/ESC
|
||||
// Radio
|
||||
parseRcChannels("AETR1234");
|
||||
cfg.deadband = 0;
|
||||
cfg.yawdeadband = 0;
|
||||
|
@ -132,9 +132,13 @@ void checkFirstTime(bool reset)
|
|||
cfg.midrc = 1500;
|
||||
cfg.mincheck = 1100;
|
||||
cfg.maxcheck = 1900;
|
||||
|
||||
// Motor/ESC/Servo
|
||||
cfg.minthrottle = 1150;
|
||||
cfg.maxthrottle = 1850;
|
||||
cfg.mincommand = 1000;
|
||||
cfg.motor_pwm_rate = 400;
|
||||
cfg.servo_pwm_rate = 50;
|
||||
|
||||
// servos
|
||||
cfg.yaw_direction = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue