Skip to content

Commit

Permalink
Merge pull request cleanflight#1528 from martinbudden/bf_trailing_spa…
Browse files Browse the repository at this point in the history
…ces1

Removed trailing spaces
  • Loading branch information
martinbudden committed Nov 11, 2016
2 parents c90a0d1 + 7c8cb32 commit c00e49e
Show file tree
Hide file tree
Showing 51 changed files with 498 additions and 498 deletions.
2 changes: 1 addition & 1 deletion src/main/blackbox/blackbox_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ static void blackboxCreateLogFile()
{
uint32_t remainder = blackboxSDCard.largestLogFileNumber + 1;

char filename[] = LOGFILE_PREFIX "00000." LOGFILE_SUFFIX;
char filename[] = LOGFILE_PREFIX "00000." LOGFILE_SUFFIX;

for (int i = 7; i >= 3; i--) {
filename[i] = (remainder % 10) + '0';
Expand Down
2 changes: 1 addition & 1 deletion src/main/cms/cms.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ STATIC_UNIT_TESTED void cmsMenuOpen(void)
{
if (!cmsInMenu) {
// New open
pCurrentDisplay = cmsDisplayPortSelectCurrent();
pCurrentDisplay = cmsDisplayPortSelectCurrent();
if (!pCurrentDisplay)
return;
cmsInMenu = true;
Expand Down
2 changes: 1 addition & 1 deletion src/main/cms/cms_menu_blackbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

//
// CMS things for blackbox and flashfs.
//
//

#include <stdbool.h>
#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion src/main/cms/cms_menu_vtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static void cmsx_Vtx_ConfigWriteback(void)
static long cmsx_Vtx_onEnter(void)
{
cmsx_Vtx_FeatureRead();
cmsx_Vtx_ConfigRead();
cmsx_Vtx_ConfigRead();

return 0;
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/config/config_master.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ typedef struct master_s {
ppmConfig_t ppmConfig;
pwmConfig_t pwmConfig;
#endif

#ifdef BEEPER
beeperConfig_t beeperConfig;
#endif
Expand Down Expand Up @@ -207,10 +207,10 @@ typedef struct master_s {
char name[MAX_NAME_LENGTH + 1];

uint8_t magic_ef; // magic number, should be 0xEF
uint8_t chk; // XOR checksum
/*
uint8_t chk; // XOR checksum
/*
do not add properties after the CHK
as it is assumed to exist at length-1
as it is assumed to exist at length-1
*/
} master_t;

Expand Down
6 changes: 3 additions & 3 deletions src/main/fc/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,14 +562,14 @@ void createDefaultConfig(master_t *config)
resetTelemetryConfig(&config->telemetryConfig);
#endif

#ifdef BEEPER
#ifdef BEEPER
resetBeeperConfig(&config->beeperConfig);
#endif

#ifdef SONAR
resetSonarConfig(&config->sonarConfig);
#endif

#ifdef SERIALRX_PROVIDER
config->rxConfig.serialrx_provider = SERIALRX_PROVIDER;
#else
Expand Down Expand Up @@ -732,7 +732,7 @@ void createDefaultConfig(master_t *config)
targetConfiguration(config);
#endif


// copy first profile into remaining profile
for (int i = 1; i < MAX_PROFILE_COUNT; i++) {
memcpy(&config->profile[i], &config->profile[0], sizeof(profile_t));
Expand Down
2 changes: 1 addition & 1 deletion src/main/flight/mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void mixerLoadMix(int index, motorMixer_t *customMixers)
void mixerConfigureOutput(void)
{
syncMotorOutputWithPidLoop = pwmIsSynced();

motorCount = QUAD_MOTOR_COUNT;

for (uint8_t i = 0; i < motorCount; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/io/ledstrip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ void ledStripEnable(void)
static void ledStripDisable(void)
{
setStripColor(&HSV(BLACK));

ws2811UpdateStrip();
}
#endif
12 changes: 6 additions & 6 deletions src/main/io/serial_4way.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static uint8_t Connect(uint8_32_u *pDeviceInfo)

static serialPort_t *port;

static uint8_t ReadByte(void)
static uint8_t ReadByte(void)
{
// need timeout?
while (!serialRxBytesWaiting(port));
Expand All @@ -392,7 +392,7 @@ static void WriteByteCrc(uint8_t b)
CRCout.word = _crc_xmodem_update(CRCout.word, b);
}

void esc4wayProcess(serialPort_t *mspPort)
void esc4wayProcess(serialPort_t *mspPort)
{

uint8_t ParamBuf[256];
Expand Down Expand Up @@ -450,16 +450,16 @@ void esc4wayProcess(serialPort_t *mspPort)
} else {
ACK_OUT = ACK_I_INVALID_CRC;
}

TX_LED_ON;

if (ACK_OUT == ACK_OK)
{
// wtf.D_FLASH_ADDR_H=Adress_H;
// wtf.D_FLASH_ADDR_L=Adress_L;
ioMem.D_PTR_I = ParamBuf;


switch(CMD) {
// ******* Interface related stuff *******
case cmd_InterfaceTestAlive:
Expand Down Expand Up @@ -816,7 +816,7 @@ void esc4wayProcess(serialPort_t *mspPort)
WriteByte(CRCout.bytes[1]);
WriteByte(CRCout.bytes[0]);
serialEndWrite(port);

TX_LED_OFF;
if (isExitScheduled) {
esc4wayRelease();
Expand Down
16 changes: 8 additions & 8 deletions src/main/io/serial_4way_avrootloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static void BL_SendBuf(uint8_t *pstring, uint8_t len)
pstring++;
len--;
} while (len > 0);

if (isMcuConnected()) {
suart_putc_(&CRC_16.bytes[0]);
suart_putc_(&CRC_16.bytes[1]);
Expand Down Expand Up @@ -238,7 +238,7 @@ static uint8_t BL_GetACK(uint32_t Timeout)
return (LastACK);
}

uint8_t BL_SendCMDKeepAlive(void)
uint8_t BL_SendCMDKeepAlive(void)
{
uint8_t sCMD[] = {CMD_KEEP_ALIVE, 0};
BL_SendBuf(sCMD, 2);
Expand Down Expand Up @@ -306,8 +306,8 @@ uint8_t BL_ReadFlash(uint8_t interface_mode, ioMem_t *pMem)
} else {
return BL_ReadA(CMD_READ_FLASH_SIL, pMem);
}
}
}

uint8_t BL_ReadEEprom(ioMem_t *pMem)
{
return BL_ReadA(CMD_READ_EEPROM, pMem);
Expand Down Expand Up @@ -829,7 +829,7 @@ uint8_t BL_ConnectEx(uint8_32_u *pDeviceInfo)
return true;
}

uint8_t BL_SendCMDKeepAlive(void)
uint8_t BL_SendCMDKeepAlive(void)
{
return true;
}
Expand All @@ -844,7 +844,7 @@ static uint8_t BL_ReadA(uint8_t cmd, ioMem_t *pMem)
{
UNUSED(cmd);
uint16_t address = pMem->D_FLASH_ADDR_H << 8 | pMem->D_FLASH_ADDR_L;

uint16_t bytes = pMem->D_NUM_BYTES;
if (bytes == 0) bytes = 256;

Expand All @@ -857,7 +857,7 @@ static uint8_t BL_WriteA(uint8_t cmd, ioMem_t *pMem, uint32_t timeout)
UNUSED(cmd);
UNUSED(timeout);
uint16_t address = pMem->D_FLASH_ADDR_H << 8 | pMem->D_FLASH_ADDR_L;

uint16_t bytes = pMem->D_NUM_BYTES;
if (bytes == 0) bytes = 256;
memcpy(&fakeFlash[address], pMem->D_PTR_I, bytes);
Expand All @@ -869,7 +869,7 @@ uint8_t BL_ReadFlash(uint8_t interface_mode, ioMem_t *pMem)
UNUSED(interface_mode);
return BL_ReadA(0, pMem);
}

uint8_t BL_ReadEEprom(ioMem_t *pMem)
{
return BL_ReadA(0, pMem);
Expand Down
2 changes: 1 addition & 1 deletion src/main/io/serial_4way_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ typedef struct {
IO_t io;
} escHardware_t;

extern uint8_t selected_esc;
extern uint8_t selected_esc;

bool isEscHi(uint8_t selEsc);
bool isEscLo(uint8_t selEsc);
Expand Down
26 changes: 13 additions & 13 deletions src/main/io/serial_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,8 @@ static const char * const lookupTableSuperExpoYaw[] = {
};

static const char * const lookupTablePwmProtocol[] = {
"OFF", "ONESHOT125", "ONESHOT42", "MULTISHOT", "BRUSHED",
#ifdef USE_DSHOT
"OFF", "ONESHOT125", "ONESHOT42", "MULTISHOT", "BRUSHED",
#ifdef USE_DSHOT
"DSHOT600", "DSHOT300", "DSHOT150"
#endif
};
Expand Down Expand Up @@ -3754,15 +3754,15 @@ typedef struct {
const cliResourceValue_t resourceTable[] = {
#ifdef BEEPER
{ OWNER_BEEPER, &masterConfig.beeperConfig.ioTag, 0 },
#endif
#endif
{ OWNER_MOTOR, &masterConfig.motorConfig.ioTags[0], MAX_SUPPORTED_MOTORS },
#ifdef USE_SERVOS
{ OWNER_SERVO, &masterConfig.servoConfig.ioTags[0], MAX_SUPPORTED_SERVOS },
#endif
#endif
#ifndef SKIP_RX_PWM_PPM
{ OWNER_PPMINPUT, &masterConfig.ppmConfig.ioTag, 0 },
{ OWNER_PWMINPUT, &masterConfig.pwmConfig.ioTags[0], PWM_INPUT_PORT_COUNT },
#endif
#endif
#ifdef SONAR
{ OWNER_SONAR_TRIGGER, &masterConfig.sonarConfig.triggerTag, 0 },
{ OWNER_SONAR_ECHO, &masterConfig.sonarConfig.echoTag, 0 },
Expand Down Expand Up @@ -3853,14 +3853,14 @@ static void cliResource(char *cmdline)
for (int i = 0; i < DMA_MAX_DESCRIPTORS; i++) {
const char* owner;
owner = ownerNames[dmaGetOwner(i)];

cliPrintf(DMA_OUTPUT_STRING, i / DMA_MOD_VALUE + 1, (i % DMA_MOD_VALUE) + DMA_MOD_OFFSET);
uint8_t resourceIndex = dmaGetResourceIndex(i);
if (resourceIndex > 0) {
cliPrintf(" %s %d\r\n", owner, resourceIndex);
} else {
cliPrintf(" %s\r\n", owner);
}
}
}

#ifndef CLI_MINIMAL_VERBOSITY
Expand All @@ -3874,14 +3874,14 @@ static void cliResource(char *cmdline)
int index = 0;
char *pch = NULL;
char *saveptr;

pch = strtok_r(cmdline, " ", &saveptr);
for (resourceIndex = 0; ; resourceIndex++) {
if (resourceIndex >= ARRAYLEN(resourceTable)) {
cliPrint("Invalid resource\r\n");
return;
}

if (strncasecmp(pch, ownerNames[resourceTable[resourceIndex].owner], len) == 0) {
break;
}
Expand All @@ -3890,7 +3890,7 @@ static void cliResource(char *cmdline)
if (resourceTable[resourceIndex].maxIndex > 0) {
pch = strtok_r(NULL, " ", &saveptr);
index = atoi(pch);

if (index <= 0 || index > resourceTable[resourceIndex].maxIndex) {
cliShowArgumentRangeError("index", 1, resourceTable[resourceIndex].maxIndex);
return;
Expand All @@ -3899,7 +3899,7 @@ static void cliResource(char *cmdline)

pch = strtok_r(NULL, " ", &saveptr);
ioTag_t *tag = (ioTag_t*)(resourceTable[resourceIndex].ptr + (index == 0 ? 0 : index - 1));

uint8_t pin = 0;
if (strlen(pch) > 0) {
if (strcasecmp(pch, "NONE") == 0) {
Expand All @@ -3916,7 +3916,7 @@ static void cliResource(char *cmdline)
pch++;
pin = atoi(pch);
if (pin < 16) {
ioRec_t *rec = IO_Rec(IOGetByTag(DEFIO_TAG_MAKE(port, pin)));
ioRec_t *rec = IO_Rec(IOGetByTag(DEFIO_TAG_MAKE(port, pin)));
if (rec) {
*tag = DEFIO_TAG_MAKE(port, pin);
cliPrintf("Resource is set to %c%02d!", port + 'A', pin);
Expand All @@ -3928,7 +3928,7 @@ static void cliResource(char *cmdline)
}
}
}

cliShowParseError();
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ void init(void)
if (feature(FEATURE_RX_PPM)) {
ppmRxInit(&masterConfig.ppmConfig, masterConfig.motorConfig.motorPwmProtocol);
} else if (feature(FEATURE_RX_PARALLEL_PWM)) {
pwmRxInit(&masterConfig.pwmConfig);
pwmRxInit(&masterConfig.pwmConfig);
}
pwmRxSetInputFilteringMode(masterConfig.inputFilteringMode);
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/main/rx/spektrum.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ uint8_t spektrumFrameStatus(void)
spek_fade_last_sec_count = fade;
spek_fade_last_sec = current_secs;
} else if(spek_fade_last_sec != current_secs) {
// If the difference is > 1, then we missed several seconds worth of frames and
// If the difference is > 1, then we missed several seconds worth of frames and
// should just throw out the fade calc (as it's likely a full signal loss).
if((current_secs - spek_fade_last_sec) == 1) {
if(rssi_channel != 0) {
Expand Down Expand Up @@ -291,7 +291,7 @@ bool spektrumInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig
if (rssi_channel >= rxRuntimeConfig->channelCount) {
rssi_channel = 0;
}

return spektrumPort != NULL;
}
#endif // SERIAL_RX
Expand Down
2 changes: 1 addition & 1 deletion src/main/sensors/initialisation.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ bool detectGyro(void)
}
#endif
; // fallthrough

case GYRO_ICM20689:
#ifdef USE_GYRO_SPI_ICM20689
if (icm20689SpiGyroDetect(&gyro))
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/ALIENFLIGHTF3/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@


// alternative defaults settings for AlienFlight targets
void targetConfiguration(master_t *config)
void targetConfiguration(master_t *config)
{
config->mag_hardware = MAG_NONE; // disabled by default
config->rxConfig.spektrum_sat_bind = 5;
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/ALIENFLIGHTF4/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@


// alternative defaults settings for AlienFlight targets
void targetConfiguration(master_t *config)
void targetConfiguration(master_t *config)
{
config->mag_hardware = MAG_NONE; // disabled by default
config->rxConfig.spektrum_sat_bind = 5;
Expand Down

0 comments on commit c00e49e

Please sign in to comment.