Merge pull request #703 from opentx/bsongis/standalone_simu

Bsongis/standalone simu
This commit is contained in:
Kjell Kernen
2014-02-20 21:18:14 +01:00
55 changed files with 4189 additions and 9554 deletions
+1 -1
View File
@@ -141,7 +141,7 @@ void audioDefevent(uint8_t e);
#define AUDIO_TIMER_LT10(m, x) AUDIO_BUZZER(audioDefevent(AU_TIMER_LT10), beep(2))
#define AUDIO_TIMER_00(m) AUDIO_BUZZER(audioDefevent(AU_TIMER_00), beep(3))
#define AUDIO_MIX_WARNING(x) AUDIO_BUZZER(audioDefevent(AU_MIX_WARNING_1+x-1), beep(1))
#define AUDIO_POT_MIDDLE(x) AUDIO_BUZZER(audioDefevent(AU_POT_MIDDLE), beep(2))
#define AUDIO_POT_MIDDLE() AUDIO_BUZZER(audioDefevent(AU_POT_MIDDLE), beep(2))
#define AUDIO_VARIO_UP() audioDefevent(AU_KEYPAD_UP)
#define AUDIO_VARIO_DOWN() audioDefevent(AU_KEYPAD_DOWN)
#define AUDIO_TRIM_MIDDLE(f) AUDIO_BUZZER(audio.event(AU_TRIM_MIDDLE, f), beep(2))
+1 -1
View File
@@ -87,7 +87,7 @@ void beep(uint8_t val);
#define AUDIO_WARNING1() beep(3)
#define AUDIO_ERROR() beep(4)
#define AUDIO_MIX_WARNING(x) beep(1)
#define AUDIO_POT_MIDDLE(x) beep(2)
#define AUDIO_POT_MIDDLE() beep(2)
#define AUDIO_TIMER_LT10(m, x) beep(2)
#define AUDIO_TIMER_00(m) beep(3)
#define AUDIO_VARIO_UP() _beep(1)
+3 -3
View File
@@ -5181,7 +5181,7 @@ void menuModelCustomScriptOne(uint8_t event)
if (i == ITEM_MODEL_CUSTOMSCRIPT_FILE) {
lcd_putsLeft(y, "Script");
if (ZEXIST(sd.file) > 0)
if (ZEXIST(sd.file))
lcd_putsnAtt(SCRIPT_ONE_2ND_COLUMN_POS, y, sd.file, sizeof(sd.file), attr);
else
lcd_putsiAtt(SCRIPT_ONE_2ND_COLUMN_POS, y, STR_VCSWFUNC, 0, attr);
@@ -5672,7 +5672,7 @@ void menuModelTelemetry(uint8_t event)
putsStrIdx(0*FW, y, STR_SCREEN, screenIndex+1);
#if defined(GAUGES)
bool screenType = IS_BARS_SCREEN(screenIndex);
if (screenType != selectMenuItem(TELEM_SCRTYPE_COL, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event))
if (screenType != (bool)selectMenuItem(TELEM_SCRTYPE_COL, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event))
g_model.frsky.screensType ^= (1 << screenIndex);
#endif
break;
@@ -5683,7 +5683,7 @@ void menuModelTelemetry(uint8_t event)
putsStrIdx(0*FW, y, STR_SCREEN, screenIndex);
#if defined(GAUGES)
bool screenType = g_model.frsky.screensType & screenIndex;
if (screenType != selectMenuItem(TELEM_SCRTYPE_COL, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event))
if (screenType != (bool)selectMenuItem(TELEM_SCRTYPE_COL, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event))
g_model.frsky.screensType ^= screenIndex;
#endif
break;
+1 -1
View File
@@ -3254,7 +3254,7 @@ void evalFunctions()
bool active = getSwitch(swtch);
if (HAS_ENABLE_PARAM(CFN_FUNC(sd))) {
active &= CFN_ACTIVE(sd);
active &= (bool)CFN_ACTIVE(sd);
}
if (active || IS_PLAY_BOTH_FUNC(CFN_FUNC(sd))) {
+3 -3
View File
@@ -365,9 +365,9 @@ void StartEepromThread(const char *filename)
{
eepromFile = filename;
if (eepromFile) {
fp = fopen(eepromFile, "r+");
fp = fopen(eepromFile, "rb+");
if (!fp)
fp = fopen(eepromFile, "w+");
fp = fopen(eepromFile, "wb+");
if (!fp) perror("error in fopen");
}
#ifdef __APPLE__
@@ -495,7 +495,7 @@ FRESULT f_open (FIL * fil, const TCHAR *name, BYTE flag)
return FR_INVALID_NAME;
fil->fsize = tmp.st_size;
}
fil->fs = (FATFS*)fopen(path, (flag & FA_WRITE) ? "w+" : "r+");
fil->fs = (FATFS*)fopen(path, (flag & FA_WRITE) ? "wb+" : "rb+");
return FR_OK;
}