mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 20:10:18 +03:00
clean up some spaces before newlines
This commit is contained in:
parent
bcac7f2e0b
commit
ad43631a8b
14 changed files with 28 additions and 28 deletions
|
@ -541,7 +541,7 @@ static void printValuePointer(const clivalue_t *var, const void *valuePointer, b
|
|||
cliPrintf("OFF");
|
||||
}
|
||||
break;
|
||||
case MODE_STRING:
|
||||
case MODE_STRING:
|
||||
cliPrintf("%s", (char *)valuePointer);
|
||||
break;
|
||||
}
|
||||
|
@ -3115,7 +3115,7 @@ static void printMap(dumpFlags_t dumpMask, const rxConfig_t *rxConfig, const rxC
|
|||
if (defaultRxConfig) {
|
||||
bufDefault[i] = '\0';
|
||||
cliDefaultPrintLinef(dumpMask, equalsDefault, formatMap, bufDefault);
|
||||
}
|
||||
}
|
||||
cliDumpPrintLinef(dumpMask, equalsDefault, formatMap, buf);
|
||||
}
|
||||
|
||||
|
@ -3955,7 +3955,7 @@ static uint8_t getWordLength(char *bufBegin, char *bufEnd)
|
|||
return bufEnd - bufBegin;
|
||||
}
|
||||
|
||||
uint16_t cliGetSettingIndex(char *name, uint8_t length)
|
||||
uint16_t cliGetSettingIndex(char *name, uint8_t length)
|
||||
{
|
||||
for (uint32_t i = 0; i < valueTableEntryCount; i++) {
|
||||
const char *settingName = valueTable[i].name;
|
||||
|
@ -4024,7 +4024,7 @@ STATIC_UNIT_TESTED void cliSet(char *cmdline)
|
|||
}
|
||||
|
||||
break;
|
||||
case MODE_LOOKUP:
|
||||
case MODE_LOOKUP:
|
||||
case MODE_BITSET: {
|
||||
int tableIndex;
|
||||
if ((val->type & VALUE_MODE_MASK) == MODE_BITSET) {
|
||||
|
@ -4118,8 +4118,8 @@ STATIC_UNIT_TESTED void cliSet(char *cmdline)
|
|||
const unsigned int len = strlen(valPtr);
|
||||
const uint8_t min = val->config.string.minlength;
|
||||
const uint8_t max = val->config.string.maxlength;
|
||||
const bool updatable = ((val->config.string.flags & STRING_FLAGS_WRITEONCE) == 0 ||
|
||||
strlen((char *)cliGetValuePointer(val)) == 0 ||
|
||||
const bool updatable = ((val->config.string.flags & STRING_FLAGS_WRITEONCE) == 0 ||
|
||||
strlen((char *)cliGetValuePointer(val)) == 0 ||
|
||||
strncmp(valPtr, (char *)cliGetValuePointer(val), len) == 0);
|
||||
|
||||
if (updatable && len > 0 && len <= max) {
|
||||
|
@ -5227,12 +5227,12 @@ static void cliTimer(char *cmdline)
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
char *pch = NULL;
|
||||
char *saveptr;
|
||||
|
||||
|
||||
ioTag_t ioTag = IO_TAG_NONE;
|
||||
pch = strtok_r(cmdline, " ", &saveptr);
|
||||
pch = strtok_r(cmdline, " ", &saveptr);
|
||||
if (!pch || !strToPin(pch, &ioTag)) {
|
||||
cliShowParseError();
|
||||
|
||||
|
@ -5393,7 +5393,7 @@ static void printConfig(char *cmdline, bool doDiff)
|
|||
if (doDiff) {
|
||||
dumpMask = dumpMask | DO_DIFF;
|
||||
}
|
||||
|
||||
|
||||
if (checkCommand(options, "defaults")) {
|
||||
dumpMask = dumpMask | SHOW_DEFAULTS; // add default values as comments for changed values
|
||||
} else if (checkCommand(options, "bare")) {
|
||||
|
|
|
@ -1445,7 +1445,7 @@ const clivalue_t valueTable[] = {
|
|||
#ifdef USE_PERSISTENT_STATS
|
||||
{ "stats", VAR_INT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_STATS_CONFIG, offsetof(statsConfig_t, stats_enabled) },
|
||||
{ "stats_total_flights", VAR_UINT32 | MASTER_VALUE, .config.u32Max = UINT32_MAX, PG_STATS_CONFIG, offsetof(statsConfig_t, stats_total_flights) },
|
||||
|
||||
|
||||
{ "stats_total_time_s", VAR_UINT32 | MASTER_VALUE, .config.u32Max = UINT32_MAX, PG_STATS_CONFIG, offsetof(statsConfig_t, stats_total_time_s) },
|
||||
{ "stats_total_dist_m", VAR_UINT32 | MASTER_VALUE, .config.u32Max = UINT32_MAX, PG_STATS_CONFIG, offsetof(statsConfig_t, stats_total_dist_m) },
|
||||
#endif
|
||||
|
|
|
@ -272,7 +272,7 @@ static uint8_t cmsx_launchControlGain;
|
|||
static long cmsx_launchControlOnEnter(void)
|
||||
{
|
||||
const pidProfile_t *pidProfile = pidProfiles(pidProfileIndex);
|
||||
|
||||
|
||||
cmsx_launchControlMode = pidProfile->launchControlMode;
|
||||
cmsx_launchControlAllowTriggerReset = pidProfile->launchControlAllowTriggerReset;
|
||||
cmsx_launchControlThrottlePercent = pidProfile->launchControlThrottlePercent;
|
||||
|
@ -338,7 +338,7 @@ static long cmsx_profileOtherOnEnter(void)
|
|||
pidProfileIndexString[1] = '0' + tmpPidProfileIndex;
|
||||
|
||||
const pidProfile_t *pidProfile = pidProfiles(pidProfileIndex);
|
||||
|
||||
|
||||
cmsx_feedForwardTransition = pidProfile->feedForwardTransition;
|
||||
|
||||
cmsx_angleStrength = pidProfile->pid[PID_LEVEL].P;
|
||||
|
|
|
@ -369,7 +369,7 @@ static OSD_TAB_t saCmsEntChan;
|
|||
static OSD_TAB_t saCmsEntPower;
|
||||
|
||||
static void saCmsInitNames(void)
|
||||
{
|
||||
{
|
||||
vtxDevice_t *device = vtxCommonDevice();
|
||||
|
||||
saCmsEntBand.val = &saCmsBand;
|
||||
|
|
|
@ -70,7 +70,7 @@ void persistentObjectRTCEnable(void)
|
|||
#else
|
||||
uint32_t persistentObjectRead(persistentObjectId_e id)
|
||||
{
|
||||
uint32_t value = RTC_ReadBackupRegister(id);
|
||||
uint32_t value = RTC_ReadBackupRegister(id);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
|
|
@ -120,14 +120,14 @@ void vtxTableConfigClearBand(vtxTableConfig_t *config, int band)
|
|||
config->bandLetters[band] = '1' + band;
|
||||
}
|
||||
|
||||
void vtxTableConfigClearPowerValues(vtxTableConfig_t *config, int start)
|
||||
void vtxTableConfigClearPowerValues(vtxTableConfig_t *config, int start)
|
||||
{
|
||||
for (int i = start; i < VTX_TABLE_MAX_POWER_LEVELS; i++) {
|
||||
config->powerValues[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void vtxTableConfigClearPowerLabels(vtxTableConfig_t *config, int start)
|
||||
void vtxTableConfigClearPowerLabels(vtxTableConfig_t *config, int start)
|
||||
{
|
||||
for (int i = start; i < VTX_TABLE_MAX_POWER_LEVELS; i++) {
|
||||
char tempbuf[4];
|
||||
|
|
|
@ -1358,7 +1358,7 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
|||
gyroAlignment = gyroDeviceConfig(0)->align;
|
||||
#endif
|
||||
sbufWriteU8(dst, gyroAlignment);
|
||||
sbufWriteU8(dst, gyroAlignment); // Starting with 4.0 gyro and acc alignment are the same
|
||||
sbufWriteU8(dst, gyroAlignment); // Starting with 4.0 gyro and acc alignment are the same
|
||||
sbufWriteU8(dst, compassConfig()->mag_align);
|
||||
|
||||
// API 1.41 - Add multi-gyro indicator, selected gyro, and support for separate gyro 1 & 2 alignment
|
||||
|
@ -1860,7 +1860,7 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
|
|||
if (sbufBytesRemaining(src) >= 1) {
|
||||
currentControlRateProfile->rcExpo[FD_PITCH] = sbufReadU8(src);
|
||||
}
|
||||
|
||||
|
||||
// version 1.41
|
||||
if (sbufBytesRemaining(src) >= 2) {
|
||||
currentControlRateProfile->throttle_limit_type = sbufReadU8(src);
|
||||
|
@ -2760,7 +2760,7 @@ static mspResult_e mspCommonProcessInCommand(uint8_t cmdMSP, sbuf_t *src, mspPos
|
|||
// API < 1.41 supports only the low 16 bits
|
||||
osdConfigMutable()->enabledWarnings = sbufReadU16(src);
|
||||
}
|
||||
|
||||
|
||||
if (sbufBytesRemaining(src) >= 4) {
|
||||
// 32bit version of enabled warnings (API >= 1.41)
|
||||
osdConfigMutable()->enabledWarnings = sbufReadU32(src);
|
||||
|
|
|
@ -28,7 +28,7 @@ typedef struct rcdeviceConfig_s {
|
|||
timeMs_t initDeviceAttemptInterval;
|
||||
|
||||
// sometimes FC can't get featureInfo from devie(still no idea), so user can set it manaually.
|
||||
uint32_t feature;
|
||||
uint32_t feature;
|
||||
uint8_t protocolVersion;
|
||||
} rcdeviceConfig_t;
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ bool sbusInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig)
|
|||
sbusBaudRate = DJI_HDL_BAUDRATE;
|
||||
sbusTimeNeededPreFrame = DJI_HDL_TIME_NEEDED_PER_FRAME;
|
||||
} else {
|
||||
rxRuntimeConfig->rxRefreshRate = SBUS_RX_REFRESH_RATE;
|
||||
rxRuntimeConfig->rxRefreshRate = SBUS_RX_REFRESH_RATE;
|
||||
sbusBaudRate = SBUS_BAUDRATE;
|
||||
sbusTimeNeededPreFrame = SBUS_TIME_NEEDED_PER_FRAME;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
#include "build/debug.h"
|
||||
|
||||
#include "common/axis.h"
|
||||
#include "common/maths.h"
|
||||
#include "common/maths.h"
|
||||
#include "common/time.h"
|
||||
|
||||
#include "drivers/serial.h"
|
||||
|
|
|
@ -537,12 +537,12 @@ uint8_t sendJetiExBusTelemetry(uint8_t packetID, uint8_t item)
|
|||
if (featureIsEnabled(FEATURE_GPS)) {
|
||||
enableGpsTelemetry(false);
|
||||
allSensorsActive = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
item = createExTelemetryValueMessage(jetiExTelemetryFrame, item);
|
||||
createExBusMessage(jetiExBusTelemetryFrame, jetiExTelemetryFrame, packetID);
|
||||
|
||||
|
||||
if (!allSensorsActive) {
|
||||
if (sensors(SENSOR_GPS)) {
|
||||
enableGpsTelemetry(true);
|
||||
|
|
|
@ -177,7 +177,7 @@ bool handleMspFrame(uint8_t *frameStart, int frameLength, uint8_t *skipsBeforeRe
|
|||
if (packet->cmd == MSP_EEPROM_WRITE && skipsBeforeResponse) {
|
||||
*skipsBeforeResponse = TELEMETRY_REQUEST_SKIPS_AFTER_EEPROMWRITE;
|
||||
}
|
||||
|
||||
|
||||
mspStarted = 0;
|
||||
sbufSwitchToReader(rxBuf, mspPackage.requestBuffer);
|
||||
processMspPacket();
|
||||
|
|
|
@ -520,7 +520,7 @@ void processSmartPortTelemetry(smartPortPayload_t *payload, volatile bool *clear
|
|||
// Pass only the payload: skip frameId
|
||||
uint8_t *frameStart = (uint8_t *)&payload->valueId;
|
||||
smartPortMspReplyPending = handleMspFrame(frameStart, SMARTPORT_MSP_PAYLOAD_SIZE, &skipRequests);
|
||||
|
||||
|
||||
// Don't send MSP response after write to eeprom
|
||||
// CPU just got out of suspended state after writeEEPROM()
|
||||
// We don't know if the receiver is listening again
|
||||
|
|
|
@ -284,7 +284,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
|
|||
lastBuffsize = buffsize;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue