1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00

Changed disable beeper method.

Fix indentation level to 4.
Removed CLI support for 1wire pass through
This commit is contained in:
4712betaflight 2015-11-30 00:42:57 +01:00 committed by borisbstyle
parent f68add5d4d
commit 5f1540dbcb
11 changed files with 118 additions and 214 deletions

View file

@ -51,7 +51,6 @@
#include "io/gimbal.h"
#include "io/rc_controls.h"
#include "io/serial.h"
#include "io/serial_1wire.h"
#include "io/ledstrip.h"
#include "io/flashfs.h"
#include "io/beeper.h"
@ -149,10 +148,6 @@ static void cliFlashRead(char *cmdline);
#endif
#endif
#ifdef USE_SERIAL_1WIRE_CLI
static void cliUSB1Wire(char *cmdline);
#endif
// buffer
static char cliBuffer[48];
static uint32_t bufferIndex = 0;
@ -229,9 +224,6 @@ typedef struct {
// should be sorted a..z for bsearch()
const clicmd_t cmdTable[] = {
#ifdef USE_SERIAL_1WIRE_CLI
CLI_COMMAND_DEF("1wire", "1-wire interface to escs", "<esc index>", cliUSB1Wire),
#endif
CLI_COMMAND_DEF("adjrange", "configure adjustment ranges", NULL, cliAdjustmentRange),
CLI_COMMAND_DEF("aux", "configure modes", NULL, cliAux),
#ifdef LED_STRIP
@ -2326,30 +2318,6 @@ static void cliStatus(char *cmdline)
printf("Cycle Time: %d, I2C Errors: %d, config size: %d\r\n", cycleTime, i2cErrorCounter, sizeof(master_t));
}
#ifdef USE_SERIAL_1WIRE_CLI
static void cliUSB1Wire(char *cmdline)
{
if (isEmpty(cmdline)) {
cliPrint("Please specify a ouput channel. e.g. `1wire 2` to connect to motor 2\r\n");
return;
} else {
usb1WireInitialize(); // init ESC outputs and get escCount value
int i;
i = atoi(cmdline);
if (i >= 0 && i <= escCount) {
printf("Switching to BlHeli mode on motor port %d\r\n", i);
// motor 1 => index 0
usb1WirePassthrough(i-1);
}
else {
printf("Invalid motor port, valid range: 1 to %d\r\n", escCount);
// cliReboot();
}
}
}
#endif
static void cliVersion(char *cmdline)
{
UNUSED(cmdline);