1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 04:15:26 +03:00

Indentation fixed so that cpplint is ok

This commit is contained in:
bsongis 2014-02-26 15:21:52 +01:00
parent 933f866e93
commit d465ee80a2
10 changed files with 125 additions and 154 deletions

View file

@ -227,7 +227,7 @@ void audioQueue::event(uint8_t e, uint8_t f)
break;
default:
{
const static pm_uint8_t singleSounds[] PROGMEM = {
static const pm_uint8_t singleSounds[] PROGMEM = {
70, 10, 2, PLAY_REPEAT(2)|PLAY_NOW, // INACTIVITY
BEEP_DEFAULT_FREQ, 40, 1, PLAY_NOW, // ERROR
BEEP_KEY_UP_FREQ, 10, 1, PLAY_NOW, // KEYPAD_UP

View file

@ -545,32 +545,7 @@ void ee32_process()
Eeprom32_process_state = E32_READSENDING ;
}
if ( Eeprom32_process_state == E32_READSENDING )
{
#if 0
if ( Spi_complete )
{
uint32_t blank = 1 ;
x = Eeprom32_data_size + sizeof( struct t_eeprom_header ) ; // Size needing to be checked
p = (uint8_t *) &Eeprom_buffer ;
while ( x )
{
if ( *p++ != 0xFF )
{
blank = 0 ;
break ;
}
x -= 1 ;
}
// If not blank, sort erasing here
if ( blank )
{
Eeprom32_state_after_erase = E32_IDLE ; // TODO really needed?
Eeprom32_process_state = E32_WRITESTART ;
}
else
{
#endif
if (Eeprom32_process_state == E32_READSENDING) {
#ifdef SIMU
Eeprom32_process_state = E32_WRITESTART ;
#else
@ -585,12 +560,9 @@ void ee32_process()
Eeprom32_process_state = E32_ERASESENDING ;
Eeprom32_state_after_erase = E32_WRITESTART ;
#endif
// }
// }
}
if ( Eeprom32_process_state == E32_WRITESTART )
{
if (Eeprom32_process_state == E32_WRITESTART) {
uint32_t total_size ;
p = Eeprom32_source_address;
q = (uint8_t *) &Eeprom_buffer.data;

View file

@ -746,8 +746,7 @@ void RlcFile::nextRlcWriteStep()
if (m_rlc_len==0) goto close;
for (i=1; 1; i++) // !! laeuft ein byte zu weit !!
{
for (i=1; 1; i++) { // !! laeuft ein byte zu weit !!
bool cur0 = m_rlc_buf[i] == 0;
if (cur0 != run0 || cnt==0x3f || (cnt0 && cnt==0x0f) || i==m_rlc_len) {
if (run0) {
@ -783,18 +782,17 @@ void RlcFile::nextRlcWriteStep()
close:
switch(m_write_step) {
case WRITE_START_STEP:
{
blkid_t fri=0;
case WRITE_START_STEP: {
blkid_t fri = 0;
if (m_currBlk && (fri=EeFsGetLink(m_currBlk))) {
if (m_currBlk && (fri = EeFsGetLink(m_currBlk))) {
// TODO reuse EeFsFree!!!
blkid_t prev_freeList = eeFs.freeList;
eeFs.freeList = fri;
#if defined(PCBTARANIS)
freeBlocks++;
#endif
while( EeFsGetLink(fri)) {
while (EeFsGetLink(fri)) {
fri = EeFsGetLink(fri);
#if defined(PCBTARANIS)
freeBlocks++;
@ -806,8 +804,7 @@ void RlcFile::nextRlcWriteStep()
}
}
case WRITE_FINAL_DIRENT_STEP:
{
case WRITE_FINAL_DIRENT_STEP: {
m_currBlk = eeFs.files[FILE_TMP].startBlk;
DirEnt & f = eeFs.files[m_fileId];
eeFs.files[FILE_TMP].startBlk = f.startBlk;

View file

@ -184,7 +184,7 @@ class RlcFile: public EFile
uint8_t m_ratio;
#endif
public:
public:
void openRlc(uint8_t i_fileId);

View file

@ -585,20 +585,24 @@ extern uint8_t channel_order(uint8_t x);
class Key
{
#define FILTERBITS 4
#ifdef SIMU
#define FFVAL 1
#define FFVAL 1
#else
#define FFVAL ((1<<FILTERBITS)-1)
#define FFVAL ((1<<FILTERBITS)-1)
#endif
#define KSTATE_OFF 0
#define KSTATE_RPTDELAY 95 // gruvin: delay state before key repeating starts
#define KSTATE_START 97
#define KSTATE_PAUSE 98
#define KSTATE_KILLED 99
private:
uint8_t m_vals; // key debounce? 4 = 40ms
uint8_t m_cnt;
uint8_t m_state;
public:
public:
void input(bool val, EnumKeys enuk);
bool state() { return m_vals > 0; }
void pauseEvents() { m_state = KSTATE_PAUSE; m_cnt = 0; }

View file

@ -51,10 +51,7 @@ extern void rtcdriver_settime(struct gtm * t);
implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift
right in the usual way when A < 0, so SHR falls back on division if
ordinary A >> B doesn't seem to be the usual signed shift. */
#define SHR(a, b) \
(-1 >> 1 == -1 \
? (a) >> (b) \
: (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
#define SHR(a, b) (-1 >> 1 == -1 ? (a) >> (b) : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
/* The extra casts in the following macros work around compiler bugs,
e.g., in Cray C 5.0.3.0. */

View file

@ -51,7 +51,8 @@ int g_snapshot_idx = 0;
class Open9xSim: public FXMainWindow
{
FXDECLARE(Open9xSim)
public:
public:
Open9xSim(){};
Open9xSim(FXApp* a);
long onKeypress(FXObject*,FXSelector,void*);
@ -60,12 +61,12 @@ public:
void doEvents();
void refreshDiplay();
private:
private:
FXImage *bmp;
FXImageFrame *bmf;
bool firstTime;
public:
public:
FXSlider *sliders[8];
FXKnob *knobs[NUM_POTS];
};

View file

@ -53,8 +53,8 @@
*
*/
#ifndef TEMPLATES_H
#define TEMPLATES_H
#ifndef TEMPLATES_H_
#define TEMPLATES_H_
#include <inttypes.h>