1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Changed tabs to spaces in io/

This commit is contained in:
Martin Budden 2016-07-09 13:29:01 +01:00
parent 93069233c9
commit 3a0f8388ee
12 changed files with 94 additions and 94 deletions

View file

@ -2912,7 +2912,7 @@ bool afatfs_chdir(afatfsFilePtr_t directory)
afatfs_initFileHandle(&afatfs.currentDirectory); afatfs_initFileHandle(&afatfs.currentDirectory);
afatfs.currentDirectory.mode = AFATFS_FILE_MODE_READ | AFATFS_FILE_MODE_WRITE; afatfs.currentDirectory.mode = AFATFS_FILE_MODE_READ | AFATFS_FILE_MODE_WRITE;
if (afatfs.filesystemType == FAT_FILESYSTEM_TYPE_FAT16) if (afatfs.filesystemType == FAT_FILESYSTEM_TYPE_FAT16)
afatfs.currentDirectory.type = AFATFS_FILE_TYPE_FAT16_ROOT_DIRECTORY; afatfs.currentDirectory.type = AFATFS_FILE_TYPE_FAT16_ROOT_DIRECTORY;
else else

View file

@ -172,7 +172,7 @@ typedef struct beeperTableEntry_s {
{ BEEPER_ENTRY(BEEPER_SYSTEM_INIT, 16, NULL, "SYSTEM_INIT") }, { BEEPER_ENTRY(BEEPER_SYSTEM_INIT, 16, NULL, "SYSTEM_INIT") },
{ BEEPER_ENTRY(BEEPER_USB, 17, NULL, "ON_USB") }, { BEEPER_ENTRY(BEEPER_USB, 17, NULL, "ON_USB") },
{ BEEPER_ENTRY(BEEPER_ALL, 18, NULL, "ALL") }, { BEEPER_ENTRY(BEEPER_ALL, 18, NULL, "ALL") },
{ BEEPER_ENTRY(BEEPER_PREFERENCE, 19, NULL, "PREFERRED") }, { BEEPER_ENTRY(BEEPER_PREFERENCE, 19, NULL, "PREFERRED") },
}; };
@ -308,7 +308,7 @@ void beeperUpdate(void)
if (!beeperIsOn) { if (!beeperIsOn) {
beeperIsOn = 1; beeperIsOn = 1;
if (currentBeeperEntry->sequence[beeperPos] != 0) { if (currentBeeperEntry->sequence[beeperPos] != 0) {
if (!(getBeeperOffMask() & (1 << (currentBeeperEntry->mode - 1)))) if (!(getBeeperOffMask() & (1 << (currentBeeperEntry->mode - 1))))
BEEP_ON; BEEP_ON;
warningLedEnable(); warningLedEnable();
warningLedRefresh(); warningLedRefresh();

View file

@ -29,7 +29,7 @@ typedef enum {
BEEPER_ARMING_GPS_FIX, // Beep a special tone when arming the board and GPS has fix BEEPER_ARMING_GPS_FIX, // Beep a special tone when arming the board and GPS has fix
BEEPER_BAT_CRIT_LOW, // Longer warning beeps when battery is critically low (repeats) BEEPER_BAT_CRIT_LOW, // Longer warning beeps when battery is critically low (repeats)
BEEPER_BAT_LOW, // Warning beeps when battery is getting low (repeats) BEEPER_BAT_LOW, // Warning beeps when battery is getting low (repeats)
BEEPER_GPS_STATUS, // FIXME **** Disable beeper when connected to USB **** BEEPER_GPS_STATUS, // FIXME **** Disable beeper when connected to USB ****
BEEPER_RX_SET, // Beeps when aux channel is set for beep or beep sequence how many satellites has found if GPS enabled BEEPER_RX_SET, // Beeps when aux channel is set for beep or beep sequence how many satellites has found if GPS enabled
BEEPER_DISARM_REPEAT, // Beeps sounded while stick held in disarm position BEEPER_DISARM_REPEAT, // Beeps sounded while stick held in disarm position
BEEPER_ACC_CALIBRATION, // ACC inflight calibration completed confirmation BEEPER_ACC_CALIBRATION, // ACC inflight calibration completed confirmation
@ -40,7 +40,7 @@ typedef enum {
BEEPER_SYSTEM_INIT, // Initialisation beeps when board is powered on BEEPER_SYSTEM_INIT, // Initialisation beeps when board is powered on
BEEPER_USB, // Some boards have beeper powered USB connected BEEPER_USB, // Some boards have beeper powered USB connected
BEEPER_ALL, // Turn ON or OFF all beeper conditions BEEPER_ALL, // Turn ON or OFF all beeper conditions
BEEPER_PREFERENCE, // Save prefered beeper configuration BEEPER_PREFERENCE, // Save prefered beeper configuration
// BEEPER_ALL and BEEPER_PREFERENCE must remain at the bottom of this enum // BEEPER_ALL and BEEPER_PREFERENCE must remain at the bottom of this enum
} beeperMode_e; } beeperMode_e;

View file

@ -239,7 +239,7 @@ void gpsInit(serialConfig_t *initialSerialConfig, gpsConfig_t *initialGpsConfig)
// only RX is needed for NMEA-style GPS // only RX is needed for NMEA-style GPS
#if !defined(COLIBRI_RACE) || !defined(LUX_RACE) #if !defined(COLIBRI_RACE) || !defined(LUX_RACE)
if (gpsConfig->provider == GPS_NMEA) if (gpsConfig->provider == GPS_NMEA)
mode &= ~MODE_TX; mode &= ~MODE_TX;
#endif #endif
// no callback - buffer will be consumed in gpsThread() // no callback - buffer will be consumed in gpsThread()
@ -256,47 +256,47 @@ void gpsInit(serialConfig_t *initialSerialConfig, gpsConfig_t *initialGpsConfig)
void gpsInitNmea(void) void gpsInitNmea(void)
{ {
#if defined(COLIBRI_RACE) || defined(LUX_RACE) #if defined(COLIBRI_RACE) || defined(LUX_RACE)
uint32_t now; uint32_t now;
#endif #endif
switch(gpsData.state) { switch(gpsData.state) {
case GPS_INITIALIZING: case GPS_INITIALIZING:
#if defined(COLIBRI_RACE) || defined(LUX_RACE) #if defined(COLIBRI_RACE) || defined(LUX_RACE)
now = millis(); now = millis();
if (now - gpsData.state_ts < 1000) if (now - gpsData.state_ts < 1000)
return; return;
gpsData.state_ts = now; gpsData.state_ts = now;
if (gpsData.state_position < 1) { if (gpsData.state_position < 1) {
serialSetBaudRate(gpsPort, 4800); serialSetBaudRate(gpsPort, 4800);
gpsData.state_position++; gpsData.state_position++;
} else if (gpsData.state_position < 2) { } else if (gpsData.state_position < 2) {
// print our FIXED init string for the baudrate we want to be at // print our FIXED init string for the baudrate we want to be at
serialPrint(gpsPort, "$PSRF100,1,115200,8,1,0*05\r\n"); serialPrint(gpsPort, "$PSRF100,1,115200,8,1,0*05\r\n");
gpsData.state_position++; gpsData.state_position++;
} else { } else {
// we're now (hopefully) at the correct rate, next state will switch to it // we're now (hopefully) at the correct rate, next state will switch to it
gpsSetState(GPS_CHANGE_BAUD); gpsSetState(GPS_CHANGE_BAUD);
} }
break; break;
#endif #endif
case GPS_CHANGE_BAUD: case GPS_CHANGE_BAUD:
#if defined(COLIBRI_RACE) || defined(LUX_RACE) #if defined(COLIBRI_RACE) || defined(LUX_RACE)
now = millis(); now = millis();
if (now - gpsData.state_ts < 1000) if (now - gpsData.state_ts < 1000)
return; return;
gpsData.state_ts = now; gpsData.state_ts = now;
if (gpsData.state_position < 1) { if (gpsData.state_position < 1) {
serialSetBaudRate(gpsPort, baudRates[gpsInitData[gpsData.baudrateIndex].baudrateIndex]); serialSetBaudRate(gpsPort, baudRates[gpsInitData[gpsData.baudrateIndex].baudrateIndex]);
gpsData.state_position++; gpsData.state_position++;
} else if (gpsData.state_position < 2) { } else if (gpsData.state_position < 2) {
serialPrint(gpsPort, "$PSRF103,00,6,00,0*23\r\n"); serialPrint(gpsPort, "$PSRF103,00,6,00,0*23\r\n");
gpsData.state_position++; gpsData.state_position++;
} else { } else {
#else #else
serialSetBaudRate(gpsPort, baudRates[gpsInitData[gpsData.baudrateIndex].baudrateIndex]); serialSetBaudRate(gpsPort, baudRates[gpsInitData[gpsData.baudrateIndex].baudrateIndex]);
#endif #endif
gpsSetState(GPS_RECEIVING_DATA); gpsSetState(GPS_RECEIVING_DATA);
#if defined(COLIBRI_RACE) || defined(LUX_RACE) #if defined(COLIBRI_RACE) || defined(LUX_RACE)
} }
#endif #endif
break; break;
} }
@ -1066,7 +1066,7 @@ static void gpsHandlePassthrough(uint8_t data)
updateDisplay(); updateDisplay();
} }
#endif #endif
} }
@ -1083,7 +1083,7 @@ void gpsEnablePassthrough(serialPort_t *gpsPassthroughPort)
displayShowFixedPage(PAGE_GPS); displayShowFixedPage(PAGE_GPS);
} }
#endif #endif
serialPassthrough(gpsPort, gpsPassthroughPort, &gpsHandlePassthrough, NULL); serialPassthrough(gpsPort, gpsPassthroughPort, &gpsHandlePassthrough, NULL);
} }

View file

@ -273,16 +273,16 @@ const ledConfig_t defaultLedStripConfig[] = {
}; };
#elif defined(USE_COLIBTI_RACE_LED_DEFAULT_CONFIG) #elif defined(USE_COLIBTI_RACE_LED_DEFAULT_CONFIG)
const ledConfig_t defaultLedStripConfig[] = { const ledConfig_t defaultLedStripConfig[] = {
{ CALCULATE_LED_XY( 0, 0), 6, LED_DIRECTION_WEST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR }, { CALCULATE_LED_XY( 0, 0), 6, LED_DIRECTION_WEST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR },
{ CALCULATE_LED_XY( 0, 1), 6, LED_DIRECTION_WEST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR }, { CALCULATE_LED_XY( 0, 1), 6, LED_DIRECTION_WEST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR },
{ CALCULATE_LED_XY( 0, 8), 6, LED_DIRECTION_WEST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR }, { CALCULATE_LED_XY( 0, 8), 6, LED_DIRECTION_WEST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR },
{ CALCULATE_LED_XY( 7, 15), 6, LED_FUNCTION_COLOR }, { CALCULATE_LED_XY( 7, 15), 6, LED_FUNCTION_COLOR },
{ CALCULATE_LED_XY( 8, 15), 6, LED_FUNCTION_COLOR }, { CALCULATE_LED_XY( 8, 15), 6, LED_FUNCTION_COLOR },
{ CALCULATE_LED_XY( 7, 14), 6, LED_FUNCTION_COLOR }, { CALCULATE_LED_XY( 7, 14), 6, LED_FUNCTION_COLOR },
{ CALCULATE_LED_XY( 8, 14), 6, LED_FUNCTION_COLOR }, { CALCULATE_LED_XY( 8, 14), 6, LED_FUNCTION_COLOR },
{ CALCULATE_LED_XY( 15, 8), 6, LED_DIRECTION_EAST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR }, { CALCULATE_LED_XY( 15, 8), 6, LED_DIRECTION_EAST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR },
{ CALCULATE_LED_XY( 15, 1), 6, LED_DIRECTION_EAST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR }, { CALCULATE_LED_XY( 15, 1), 6, LED_DIRECTION_EAST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR },
{ CALCULATE_LED_XY( 15, 0), 6, LED_DIRECTION_EAST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR }, { CALCULATE_LED_XY( 15, 0), 6, LED_DIRECTION_EAST | LED_FUNCTION_WARNING | LED_FUNCTION_COLOR },
}; };
#else #else
const ledConfig_t defaultLedStripConfig[] = { const ledConfig_t defaultLedStripConfig[] = {
@ -370,8 +370,8 @@ static const uint16_t functionMappings[FUNCTION_COUNT] = {
LED_FUNCTION_FLIGHT_MODE, LED_FUNCTION_FLIGHT_MODE,
LED_FUNCTION_ARM_STATE, LED_FUNCTION_ARM_STATE,
LED_FUNCTION_THROTTLE, LED_FUNCTION_THROTTLE,
LED_FUNCTION_THRUST_RING, LED_FUNCTION_THRUST_RING,
LED_FUNCTION_COLOR LED_FUNCTION_COLOR
}; };
// grid offsets // grid offsets
@ -938,7 +938,7 @@ static void applyLedAnimationLayer(void)
void updateLedStrip(void) void updateLedStrip(void)
{ {
if (!(ledStripInitialised && isWS2811LedStripReady())) { if (!(ledStripInitialised && isWS2811LedStripReady())) {
return; return;
} }
@ -950,11 +950,11 @@ void updateLedStrip(void)
} else { } else {
ledStripEnabled = true; ledStripEnabled = true;
} }
if (!ledStripEnabled){ if (!ledStripEnabled){
return; return;
} }
uint32_t now = micros(); uint32_t now = micros();
@ -1115,8 +1115,8 @@ void ledStripEnable(void)
static void ledStripDisable(void) static void ledStripDisable(void)
{ {
setStripColor(&hsv_black); setStripColor(&hsv_black);
ws2811UpdateStrip(); ws2811UpdateStrip();
} }
#endif #endif

View file

@ -328,12 +328,12 @@ bool isModeActivationConditionPresent(modeActivationCondition_t *modeActivationC
for (index = 0; index < MAX_MODE_ACTIVATION_CONDITION_COUNT; index++) { for (index = 0; index < MAX_MODE_ACTIVATION_CONDITION_COUNT; index++) {
modeActivationCondition_t *modeActivationCondition = &modeActivationConditions[index]; modeActivationCondition_t *modeActivationCondition = &modeActivationConditions[index];
if (modeActivationCondition->modeId == modeId && IS_RANGE_USABLE(&modeActivationCondition->range)) { if (modeActivationCondition->modeId == modeId && IS_RANGE_USABLE(&modeActivationCondition->range)) {
return true; return true;
} }
} }
return false; return false;
} }
@ -607,7 +607,7 @@ void applySelectAdjustment(uint8_t adjustmentFunction, uint8_t position)
switch(adjustmentFunction) { switch(adjustmentFunction) {
case ADJUSTMENT_RATE_PROFILE: case ADJUSTMENT_RATE_PROFILE:
if (getCurrentControlRateProfile() != position) { if (getCurrentControlRateProfile() != position) {
changeControlRateProfile(position); changeControlRateProfile(position);
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_RATE_PROFILE, position); blackboxLogInflightAdjustmentEvent(ADJUSTMENT_RATE_PROFILE, position);
applied = true; applied = true;
} }

View file

@ -380,7 +380,7 @@ void esc4wayProcess(serialPort_t *serial)
writeByte(crcOut >> 8); writeByte(crcOut >> 8);
writeByte(crcOut & 0xff); writeByte(crcOut & 0xff);
serialEndWrite(port); serialEndWrite(port);
#ifdef STM32F4 #ifdef STM32F4
delay(50); delay(50);
#endif #endif

View file

@ -89,7 +89,7 @@ static uint8_t ckSumOut;
static void StkSendByte(uint8_t dat) static void StkSendByte(uint8_t dat)
{ {
ckSumOut ^= dat; ckSumOut ^= dat;
for (uint8_t i = 0; i < 8; i++) { for (uint8_t i = 0; i < 8; i++) {
if (dat & 0x01) { if (dat & 0x01) {
// 1-bits are encoded as 64.0us high, 72.8us low (135.8us total). // 1-bits are encoded as 64.0us high, 72.8us low (135.8us total).
ESC_SET_HI; ESC_SET_HI;
@ -248,9 +248,9 @@ static uint8_t _CMD_SPI_MULTI_EX(uint8_t * resByte, uint8_t subcmd, uint16_t add
StkSendByte(4); // NumTX StkSendByte(4); // NumTX
StkSendByte(4); // NumRX StkSendByte(4); // NumRX
StkSendByte(0); // RxStartAdr StkSendByte(0); // RxStartAdr
StkSendByte(subcmd); // {TxData} Cmd StkSendByte(subcmd); // {TxData} Cmd
StkSendByte(addr >> 8); // {TxData} AdrHi StkSendByte(addr >> 8); // {TxData} AdrHi
StkSendByte(addr & 0xff); // {TxData} AdrLow StkSendByte(addr & 0xff); // {TxData} AdrLow
StkSendByte(0); // {TxData} 0 StkSendByte(0); // {TxData} 0
StkSendPacketFooter(); StkSendPacketFooter();
if (StkRcvPacket(stkInBuf, sizeof(stkInBuf))) { // NumRX + 3 if (StkRcvPacket(stkInBuf, sizeof(stkInBuf))) { // NumRX + 3

View file

@ -1983,7 +1983,7 @@ static void cliDump(char *cmdline)
cliPrintf("%s\r\n", ftoa(yaw, buf)); cliPrintf("%s\r\n", ftoa(yaw, buf));
#ifdef USE_SLOW_SERIAL_CLI #ifdef USE_SLOW_SERIAL_CLI
delay(2); delay(2);
#endif #endif
} }
#ifdef USE_SERVOS #ifdef USE_SERVOS
@ -2008,7 +2008,7 @@ static void cliDump(char *cmdline)
#ifdef USE_SLOW_SERIAL_CLI #ifdef USE_SLOW_SERIAL_CLI
delay(2); delay(2);
#endif #endif
} }
#endif #endif
@ -2023,7 +2023,7 @@ static void cliDump(char *cmdline)
cliPrintf("feature -%s\r\n", featureNames[i]); cliPrintf("feature -%s\r\n", featureNames[i]);
#ifdef USE_SLOW_SERIAL_CLI #ifdef USE_SLOW_SERIAL_CLI
delay(2); delay(2);
#endif #endif
} }
for (i = 0; ; i++) { // reenable what we want. for (i = 0; ; i++) { // reenable what we want.
if (featureNames[i] == NULL) if (featureNames[i] == NULL)
@ -2032,7 +2032,7 @@ static void cliDump(char *cmdline)
cliPrintf("feature %s\r\n", featureNames[i]); cliPrintf("feature %s\r\n", featureNames[i]);
#ifdef USE_SLOW_SERIAL_CLI #ifdef USE_SLOW_SERIAL_CLI
delay(2); delay(2);
#endif #endif
} }
@ -2094,7 +2094,7 @@ static void cliDump(char *cmdline)
cliPrintf("smix reverse %d %d r\r\n", i , channel); cliPrintf("smix reverse %d %d r\r\n", i , channel);
#ifdef USE_SLOW_SERIAL_CLI #ifdef USE_SLOW_SERIAL_CLI
delay(2); delay(2);
#endif #endif
} }
} }
} }
@ -2111,7 +2111,7 @@ static void cliDump(char *cmdline)
cliPrint("\r\n# rxfail\r\n"); cliPrint("\r\n# rxfail\r\n");
cliRxFail(""); cliRxFail("");
if (dumpMask & DUMP_ALL) { if (dumpMask & DUMP_ALL) {
uint8_t activeProfile = masterConfig.current_profile_index; uint8_t activeProfile = masterConfig.current_profile_index;
uint8_t profileCount; uint8_t profileCount;
@ -2129,7 +2129,7 @@ static void cliDump(char *cmdline)
cliRateProfile(""); cliRateProfile("");
#ifdef USE_SLOW_SERIAL_CLI #ifdef USE_SLOW_SERIAL_CLI
delay(2); delay(2);
#endif #endif
} }
cliPrint("\r\n# restore original profile selection\r\n"); cliPrint("\r\n# restore original profile selection\r\n");
@ -2158,7 +2158,7 @@ void cliDumpProfile(uint8_t profileIndex)
{ {
if (profileIndex >= MAX_PROFILE_COUNT) // Faulty values if (profileIndex >= MAX_PROFILE_COUNT) // Faulty values
return; return;
changeProfile(profileIndex); changeProfile(profileIndex);
cliPrint("\r\n# profile\r\n"); cliPrint("\r\n# profile\r\n");
cliProfile(""); cliProfile("");
@ -2174,7 +2174,7 @@ void cliDumpRateProfile(uint8_t rateProfileIndex)
{ {
if (rateProfileIndex >= MAX_RATEPROFILES) // Faulty values if (rateProfileIndex >= MAX_RATEPROFILES) // Faulty values
return; return;
changeControlRateProfile(rateProfileIndex); changeControlRateProfile(rateProfileIndex);
cliPrint("\r\n# rateprofile\r\n"); cliPrint("\r\n# rateprofile\r\n");
cliRateProfile(""); cliRateProfile("");
@ -2551,7 +2551,7 @@ static void cliProfile(char *cmdline)
static void cliRateProfile(char *cmdline) { static void cliRateProfile(char *cmdline) {
int i; int i;
if (isEmpty(cmdline)) { if (isEmpty(cmdline)) {
cliPrintf("rateprofile %d\r\n", getCurrentControlRateProfile()); cliPrintf("rateprofile %d\r\n", getCurrentControlRateProfile());
return; return;
@ -2566,18 +2566,18 @@ static void cliRateProfile(char *cmdline) {
static void cliReboot(void) static void cliReboot(void)
{ {
cliRebootEx(false); cliRebootEx(false);
} }
static void cliRebootEx(bool bootLoader) static void cliRebootEx(bool bootLoader)
{ {
cliPrint("\r\nRebooting"); cliPrint("\r\nRebooting");
bufWriterFlush(cliWriter); bufWriterFlush(cliWriter);
waitForSerialPortToFinishTransmitting(cliPort); waitForSerialPortToFinishTransmitting(cliPort);
stopMotors(); stopMotors();
if (bootLoader) { if (bootLoader) {
systemResetToBootloader(); systemResetToBootloader();
return; return;
} }
systemReset(); systemReset();
} }
@ -2749,10 +2749,10 @@ static void cliSet(char *cmdline)
cliPrintf("%s = ", valueTable[i].name); cliPrintf("%s = ", valueTable[i].name);
cliPrintVar(val, len); // when len is 1 (when * is passed as argument), it will print min/max values as well, for gui cliPrintVar(val, len); // when len is 1 (when * is passed as argument), it will print min/max values as well, for gui
cliPrint("\r\n"); cliPrint("\r\n");
#ifdef USE_SLOW_SERIAL_CLI #ifdef USE_SLOW_SERIAL_CLI
delay(2); delay(2);
#endif #endif
} }
} else if ((eqptr = strstr(cmdline, "=")) != NULL) { } else if ((eqptr = strstr(cmdline, "=")) != NULL) {
// has equals // has equals
@ -3082,22 +3082,22 @@ static void cliResource(char *cmdline)
const char* owner; const char* owner;
owner = ownerNames[ioRecs[i].owner]; owner = ownerNames[ioRecs[i].owner];
const char* resource; const char* resource;
resource = resourceNames[ioRecs[i].resource]; resource = resourceNames[ioRecs[i].resource];
if (ioRecs[i].index > 0) { if (ioRecs[i].index > 0) {
cliPrintf("%c%02d: %s%d %s\r\n", IO_GPIOPortIdx(ioRecs + i) + 'A', IO_GPIOPinIdx(ioRecs + i), owner, ioRecs[i].index, resource); cliPrintf("%c%02d: %s%d %s\r\n", IO_GPIOPortIdx(ioRecs + i) + 'A', IO_GPIOPinIdx(ioRecs + i), owner, ioRecs[i].index, resource);
} else { } else {
cliPrintf("%c%02d: %s %s\r\n", IO_GPIOPortIdx(ioRecs + i) + 'A', IO_GPIOPinIdx(ioRecs + i), owner, resource); cliPrintf("%c%02d: %s %s\r\n", IO_GPIOPortIdx(ioRecs + i) + 'A', IO_GPIOPinIdx(ioRecs + i), owner, resource);
} }
} }
} }
void cliDfu(char *cmdLine) void cliDfu(char *cmdLine)
{ {
UNUSED(cmdLine); UNUSED(cmdLine);
cliPrint("\r\nRestarting in DFU mode"); cliPrint("\r\nRestarting in DFU mode");
cliRebootEx(true); cliRebootEx(true);
} }
void cliInit(serialConfig_t *serialConfig) void cliInit(serialConfig_t *serialConfig)

View file

@ -293,7 +293,7 @@ static uint32_t read32(void)
static void headSerialResponse(uint8_t err, uint8_t responseBodySize) static void headSerialResponse(uint8_t err, uint8_t responseBodySize)
{ {
serialBeginWrite(mspSerialPort); serialBeginWrite(mspSerialPort);
serialize8('$'); serialize8('$');
serialize8('M'); serialize8('M');
serialize8(err ? '!' : '>'); serialize8(err ? '!' : '>');

View file

@ -76,7 +76,7 @@ static uint8_t locked = 0;
void vtxInit(void) void vtxInit(void)
{ {
rtc6705Init(); rtc6705Init();
if (masterConfig.vtx_mode == 0) { if (masterConfig.vtx_mode == 0) {
rtc6705SetChannel(masterConfig.vtx_band, masterConfig.vtx_channel); rtc6705SetChannel(masterConfig.vtx_band, masterConfig.vtx_channel);
} else if (masterConfig.vtx_mode == 1) { } else if (masterConfig.vtx_mode == 1) {

View file

@ -17,11 +17,11 @@
#pragma once #pragma once
#define VTX_BAND_MIN 1 #define VTX_BAND_MIN 1
#define VTX_BAND_MAX 5 #define VTX_BAND_MAX 5
#define VTX_CHANNEL_MIN 1 #define VTX_CHANNEL_MIN 1
#define VTX_CHANNEL_MAX 8 #define VTX_CHANNEL_MAX 8
#define MAX_CHANNEL_ACTIVATION_CONDITION_COUNT 10 #define MAX_CHANNEL_ACTIVATION_CONDITION_COUNT 10
typedef struct vtxChannelActivationCondition_s { typedef struct vtxChannelActivationCondition_s {
uint8_t auxChannelIndex; uint8_t auxChannelIndex;