From b4b00ecddc437f74efd37b7c230afe1a404bc08e Mon Sep 17 00:00:00 2001 From: bsongis Date: Thu, 4 Oct 2012 19:24:16 +0000 Subject: [PATCH] [all] Throttle Trace resetted when changing Model [sky9x] Background music stopped when changing Model --- src/beeper.h | 1 + src/eeprom_arm.cpp | 3 ++- src/eeprom_avr.cpp | 3 ++- src/general_menus.cpp | 10 ++++------ src/open9x.cpp | 10 ++++++++-- src/sky9x/audio.cpp | 16 +++++++++++----- src/sky9x/audio.h | 3 +++ src/sky9x/diskio.cpp | 4 +--- src/stock/audio.h | 2 +- 9 files changed, 33 insertions(+), 19 deletions(-) diff --git a/src/beeper.h b/src/beeper.h index 3583a0776..b7acfc5f4 100644 --- a/src/beeper.h +++ b/src/beeper.h @@ -84,6 +84,7 @@ extern void beep(uint8_t val); #define AUDIO_PLAY(p) beep(3) #define IS_AUDIO_BUSY() (g_beepCnt || beepAgain || beepOn) +#define AUDIO_RESET() #if !defined(PCBSKY9X) FORCEINLINE void AUDIO_HEARTBEAT() diff --git a/src/eeprom_arm.cpp b/src/eeprom_arm.cpp index 747a1b5b6..40b7fca2a 100644 --- a/src/eeprom_arm.cpp +++ b/src/eeprom_arm.cpp @@ -498,6 +498,8 @@ void eeLoadModel(uint8_t id) read32_eeprom_data( ( File_system[id+1].block_no << 12) + sizeof( struct t_eeprom_header), ( uint8_t *)&g_model, size) ; } + resetAll(); + if (pulsesStarted()) { checkTHR(); checkSwitches(); @@ -509,7 +511,6 @@ void eeLoadModel(uint8_t id) activeFunctionSwitches = 0; resetProto(); - resetAll(); for (uint8_t i=0; i