1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 19:40:31 +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:
timecop 2012-03-30 09:49:00 +00:00
parent 97cdebfb13
commit 58eb2b966f
16 changed files with 2645 additions and 2619 deletions

View file

@ -34,9 +34,8 @@ const char *mixerNames[] = {
// sync this with AvailableFeatures enum from board.h
const char *featureNames[] = {
"PPM", "VBAT", "INFLIGHT_ACC_CAL", "DIGITAL_SERVO", "MOTOR_STOP",
"PPM", "VBAT", "INFLIGHT_ACC_CAL", "SPEKTRUM", "MOTOR_STOP",
"SERVO_TILT", "CAMTRIG", "GYRO_SMOOTHING", "LED_RING", "GPS",
"SPEKTRUM",
NULL
};
@ -91,6 +90,8 @@ const clivalue_t valueTable[] = {
{ "mincommand", VAR_UINT16, &cfg.mincommand, 0, 2000 },
{ "mincheck", VAR_UINT16, &cfg.mincheck, 0, 2000 },
{ "maxcheck", VAR_UINT16, &cfg.maxcheck, 0, 2000 },
{ "motor_pwm_rate", VAR_UINT16, &cfg.motor_pwm_rate, 50, 498 },
{ "servo_pwm_rate", VAR_UINT16, &cfg.servo_pwm_rate, 50, 498 },
{ "spektrum_hires", VAR_UINT8, &cfg.spektrum_hires, 0, 1 },
{ "vbatscale", VAR_UINT8, &cfg.vbatscale, 10, 200 },
{ "vbatmaxcellvoltage", VAR_UINT8, &cfg.vbatmaxcellvoltage, 10, 50 },
@ -261,9 +262,10 @@ static void cliHelp(char *cmdline)
for (i = 0; i < CMD_COUNT; i++) {
uartPrint(cmdTable[i].name);
uartWrite(' ');
uartWrite('\t');
uartPrint(cmdTable[i].param);
uartPrint("\r\n");
while (!uartTransmitEmpty());
}
}
@ -410,7 +412,7 @@ static void cliSet(char *cmdline)
uartPrint(" = ");
cliPrintVar(val);
uartPrint("\r\n");
delay(10);
while (!uartTransmitEmpty());
}
} else if ((eqptr = strstr(cmdline, "="))) {
// has equal, set var