[all] Mixer bugs fixed (slow / delays)

[stock] Flash saving
[stock] PWM backlight fix
[stock] NAVIGATION=STICKS pulled from er9x, thanks Mike!
[Taranis] Telemetry logs in DEBUG mode correctly opened / closed (not tested)
This commit is contained in:
bsongis@gmail.com
2013-05-31 19:33:20 +00:00
parent 7e7b1914ff
commit c9171c6d79
15 changed files with 311 additions and 169 deletions
+1
View File
@@ -104,6 +104,7 @@ void delay_01us(uint16_t nb);
#define SD_GET_BLOCKNR() (0)
#define SD_GET_SPEED() (0)
void sdInit();
void sdDone();
void sdPoll10ms();
#define sdMountPoll()
uint32_t sdMounted();
+22 -1
View File
@@ -959,12 +959,33 @@ void sdPoll10ms()
}
}
// TODO everything here should not be in the driver layer ...
FATFS g_FATFS_Obj;
#if defined(DEBUG)
FIL g_telemetryFile = {0};
#endif
void sdInit()
{
if (f_mount(0, &g_FATFS_Obj) == FR_OK)
if (f_mount(0, &g_FATFS_Obj) == FR_OK) {
refreshSystemAudioFiles();
#if defined(DEBUG)
f_open(&g_telemetryFile, LOGS_PATH "/sport.log", FA_CREATE_ALWAYS | FA_WRITE);
#endif
}
}
void sdDone()
{
if (sdMounted()) {
audioQueue.stopSD();
closeLogs();
#if defined(DEBUG)
f_close(&g_telemetryFile);
#endif
f_mount(0, 0); // unmount SD
}
}
uint32_t sdMounted()
+1 -6
View File
@@ -107,12 +107,7 @@ void USBD_USR_DeviceResumed(void)
*/
void USBD_USR_DeviceConnected (void)
{
if (sdMounted()) {
audioQueue.stopSD();
closeLogs();
f_mount(0, 0); // unmount SD
}
sdDone();
eeCheck(true);
usbState = USB_CONNECTED;
}