mirror of
https://github.com/opentx/opentx.git
synced 2025-07-14 20:10:08 +03:00
Indentation fixed so that cpplint is ok
This commit is contained in:
parent
933f866e93
commit
d465ee80a2
10 changed files with 125 additions and 154 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,8 +782,7 @@ void RlcFile::nextRlcWriteStep()
|
|||
close:
|
||||
|
||||
switch(m_write_step) {
|
||||
case WRITE_START_STEP:
|
||||
{
|
||||
case WRITE_START_STEP: {
|
||||
blkid_t fri = 0;
|
||||
|
||||
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;
|
||||
DirEnt & f = eeFs.files[m_fileId];
|
||||
eeFs.files[FILE_TMP].startBlk = f.startBlk;
|
||||
|
|
|
@ -585,16 +585,20 @@ extern uint8_t channel_order(uint8_t x);
|
|||
class Key
|
||||
{
|
||||
#define FILTERBITS 4
|
||||
|
||||
#ifdef SIMU
|
||||
#define FFVAL 1
|
||||
#else
|
||||
#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;
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -51,6 +51,7 @@ int g_snapshot_idx = 0;
|
|||
class Open9xSim: public FXMainWindow
|
||||
{
|
||||
FXDECLARE(Open9xSim)
|
||||
|
||||
public:
|
||||
Open9xSim(){};
|
||||
Open9xSim(FXApp* a);
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef TEMPLATES_H
|
||||
#define TEMPLATES_H
|
||||
#ifndef TEMPLATES_H_
|
||||
#define TEMPLATES_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue