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; break;
default: default:
{ {
const static pm_uint8_t singleSounds[] PROGMEM = { static const pm_uint8_t singleSounds[] PROGMEM = {
70, 10, 2, PLAY_REPEAT(2)|PLAY_NOW, // INACTIVITY 70, 10, 2, PLAY_REPEAT(2)|PLAY_NOW, // INACTIVITY
BEEP_DEFAULT_FREQ, 40, 1, PLAY_NOW, // ERROR BEEP_DEFAULT_FREQ, 40, 1, PLAY_NOW, // ERROR
BEEP_KEY_UP_FREQ, 10, 1, PLAY_NOW, // KEYPAD_UP BEEP_KEY_UP_FREQ, 10, 1, PLAY_NOW, // KEYPAD_UP

View file

@ -545,32 +545,7 @@ void ee32_process()
Eeprom32_process_state = E32_READSENDING ; Eeprom32_process_state = E32_READSENDING ;
} }
if ( 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
#ifdef SIMU #ifdef SIMU
Eeprom32_process_state = E32_WRITESTART ; Eeprom32_process_state = E32_WRITESTART ;
#else #else
@ -585,12 +560,9 @@ void ee32_process()
Eeprom32_process_state = E32_ERASESENDING ; Eeprom32_process_state = E32_ERASESENDING ;
Eeprom32_state_after_erase = E32_WRITESTART ; Eeprom32_state_after_erase = E32_WRITESTART ;
#endif #endif
// }
// }
} }
if ( Eeprom32_process_state == E32_WRITESTART ) if (Eeprom32_process_state == E32_WRITESTART) {
{
uint32_t total_size ; uint32_t total_size ;
p = Eeprom32_source_address; p = Eeprom32_source_address;
q = (uint8_t *) &Eeprom_buffer.data; q = (uint8_t *) &Eeprom_buffer.data;

View file

@ -746,8 +746,7 @@ void RlcFile::nextRlcWriteStep()
if (m_rlc_len==0) goto close; 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; bool cur0 = m_rlc_buf[i] == 0;
if (cur0 != run0 || cnt==0x3f || (cnt0 && cnt==0x0f) || i==m_rlc_len) { if (cur0 != run0 || cnt==0x3f || (cnt0 && cnt==0x0f) || i==m_rlc_len) {
if (run0) { if (run0) {
@ -783,8 +782,7 @@ void RlcFile::nextRlcWriteStep()
close: close:
switch(m_write_step) { switch(m_write_step) {
case WRITE_START_STEP: case WRITE_START_STEP: {
{
blkid_t fri = 0; blkid_t fri = 0;
if (m_currBlk && (fri = EeFsGetLink(m_currBlk))) { if (m_currBlk && (fri = EeFsGetLink(m_currBlk))) {
@ -806,8 +804,7 @@ void RlcFile::nextRlcWriteStep()
} }
} }
case WRITE_FINAL_DIRENT_STEP: case WRITE_FINAL_DIRENT_STEP: {
{
m_currBlk = eeFs.files[FILE_TMP].startBlk; m_currBlk = eeFs.files[FILE_TMP].startBlk;
DirEnt & f = eeFs.files[m_fileId]; DirEnt & f = eeFs.files[m_fileId];
eeFs.files[FILE_TMP].startBlk = f.startBlk; eeFs.files[FILE_TMP].startBlk = f.startBlk;

View file

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

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 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 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. */ ordinary A >> B doesn't seem to be the usual signed shift. */
#define SHR(a, b) \ #define SHR(a, b) (-1 >> 1 == -1 ? (a) >> (b) : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
(-1 >> 1 == -1 \
? (a) >> (b) \
: (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
/* The extra casts in the following macros work around compiler bugs, /* The extra casts in the following macros work around compiler bugs,
e.g., in Cray C 5.0.3.0. */ e.g., in Cray C 5.0.3.0. */

View file

@ -51,6 +51,7 @@ int g_snapshot_idx = 0;
class Open9xSim: public FXMainWindow class Open9xSim: public FXMainWindow
{ {
FXDECLARE(Open9xSim) FXDECLARE(Open9xSim)
public: public:
Open9xSim(){}; Open9xSim(){};
Open9xSim(FXApp* a); Open9xSim(FXApp* a);

View file

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