Some TODOs removed
This commit is contained in:
+4
-2
@@ -931,9 +931,9 @@ const pm_char * eeBackupModel(uint8_t i_fileSrc)
|
|||||||
|
|
||||||
buf[sizeof(MODELS_PATH)-1] = '/';
|
buf[sizeof(MODELS_PATH)-1] = '/';
|
||||||
memcpy(&buf[sizeof(MODELS_PATH)], ModelNames[i_fileSrc], sizeof(g_model.name));
|
memcpy(&buf[sizeof(MODELS_PATH)], ModelNames[i_fileSrc], sizeof(g_model.name));
|
||||||
buf[sizeof(MODELS_PATH)+FILENAME_MAXLEN] = '\0';
|
buf[sizeof(MODELS_PATH)+sizeof(g_model.name)] = '\0';
|
||||||
|
|
||||||
uint8_t i = sizeof(MODELS_PATH)+FILENAME_MAXLEN-1;
|
uint8_t i = sizeof(MODELS_PATH)+sizeof(g_model.name)-1;
|
||||||
uint8_t len = 0;
|
uint8_t len = 0;
|
||||||
while (i>sizeof(MODELS_PATH)-1) {
|
while (i>sizeof(MODELS_PATH)-1) {
|
||||||
if (!len && buf[i])
|
if (!len && buf[i])
|
||||||
@@ -1007,6 +1007,8 @@ const pm_char * eeRestoreModel(uint8_t i_fileDst, char *model_name)
|
|||||||
|
|
||||||
if (buf[0] != g_eeGeneral.myVers) {
|
if (buf[0] != g_eeGeneral.myVers) {
|
||||||
// TODO
|
// TODO
|
||||||
|
f_close(&restoreFile);
|
||||||
|
return STR_INCOMPATIBLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eeModelExists(i_fileDst)) {
|
if (eeModelExists(i_fileDst)) {
|
||||||
|
|||||||
+4
-2
@@ -552,9 +552,9 @@ const pm_char * eeBackupModel(uint8_t i_fileSrc)
|
|||||||
|
|
||||||
buf[sizeof(MODELS_PATH)-1] = '/';
|
buf[sizeof(MODELS_PATH)-1] = '/';
|
||||||
eeLoadModelName(i_fileSrc, &buf[sizeof(MODELS_PATH)]);
|
eeLoadModelName(i_fileSrc, &buf[sizeof(MODELS_PATH)]);
|
||||||
buf[sizeof(MODELS_PATH)+FILENAME_MAXLEN] = '\0';
|
buf[sizeof(MODELS_PATH)+sizeof(g_model.name)] = '\0';
|
||||||
|
|
||||||
uint8_t i = sizeof(MODELS_PATH)+FILENAME_MAXLEN-1;
|
uint8_t i = sizeof(MODELS_PATH)+sizeof(g_model.name)-1;
|
||||||
uint8_t len = 0;
|
uint8_t len = 0;
|
||||||
while (i>sizeof(MODELS_PATH)-1) {
|
while (i>sizeof(MODELS_PATH)-1) {
|
||||||
if (!len && buf[i])
|
if (!len && buf[i])
|
||||||
@@ -630,6 +630,8 @@ const pm_char * eeRestoreModel(uint8_t i_fileDst, char *model_name)
|
|||||||
|
|
||||||
if (buf[0] != g_eeGeneral.myVers) {
|
if (buf[0] != g_eeGeneral.myVers) {
|
||||||
// TODO
|
// TODO
|
||||||
|
f_close(&restoreFile);
|
||||||
|
return STR_INCOMPATIBLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eeModelExists(i_fileDst)) {
|
if (eeModelExists(i_fileDst)) {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
/* MMCv3/SDv1/SDv2 (in SPI mode) control module (C)ChaN, 2010 */
|
/* MMCv3/SDv1/SDv2 (in SPI mode) control module (C)ChaN, 2010 */
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
/* Only rcvr_spi(), xmit_spi(), disk_timerproc() and some macros */
|
/* Only rcvr_spi(), xmit_spi(), sdPoll10mS() and some macros */
|
||||||
/* are platform dependent. */
|
/* are platform dependent. */
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
/* MMCv3/SDv1/SDv2 (in SPI mode) control module (C)ChaN, 2010 */
|
/* MMCv3/SDv1/SDv2 (in SPI mode) control module (C)ChaN, 2010 */
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
/* Only rcvr_spi(), xmit_spi(), disk_timerproc() and some macros */
|
/* Only rcvr_spi(), xmit_spi(), sdPoll10mS() and some macros */
|
||||||
/* are platform dependent. */
|
/* are platform dependent. */
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
|
|
||||||
@@ -615,7 +615,7 @@ DRESULT disk_ioctl (
|
|||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
/* This function must be called in period of 10ms */
|
/* This function must be called in period of 10ms */
|
||||||
|
|
||||||
void disk_timerproc (void)
|
void sdPoll10mS (void)
|
||||||
{
|
{
|
||||||
BYTE s;
|
BYTE s;
|
||||||
|
|
||||||
|
|||||||
@@ -66,9 +66,9 @@ const pm_char * openLogs()
|
|||||||
|
|
||||||
buf[sizeof(LOGS_PATH)-1] = '/';
|
buf[sizeof(LOGS_PATH)-1] = '/';
|
||||||
memcpy(&buf[sizeof(LOGS_PATH)], g_model.name, sizeof(g_model.name));
|
memcpy(&buf[sizeof(LOGS_PATH)], g_model.name, sizeof(g_model.name));
|
||||||
buf[sizeof(LOGS_PATH)+FILENAME_MAXLEN] = '\0';
|
buf[sizeof(LOGS_PATH)+sizeof(g_model.name)] = '\0';
|
||||||
|
|
||||||
uint8_t i = sizeof(LOGS_PATH)+FILENAME_MAXLEN-1;
|
uint8_t i = sizeof(LOGS_PATH)+sizeof(g_model.name)-1;
|
||||||
uint8_t len = 0;
|
uint8_t len = 0;
|
||||||
while (i>sizeof(LOGS_PATH)-1) {
|
while (i>sizeof(LOGS_PATH)-1) {
|
||||||
if (!len && buf[i])
|
if (!len && buf[i])
|
||||||
|
|||||||
+1
-1
@@ -2208,7 +2208,7 @@ void menuProcCustomSwitches(uint8_t event)
|
|||||||
|
|
||||||
void menuProcFunctionSwitches(uint8_t event)
|
void menuProcFunctionSwitches(uint8_t event)
|
||||||
{
|
{
|
||||||
#if defined(SDCARD)
|
#if defined(PCBARM) && defined(SDCARD)
|
||||||
uint8_t _event = event;
|
uint8_t _event = event;
|
||||||
if (s_warning || s_menu_count) {
|
if (s_warning || s_menu_count) {
|
||||||
event = 0;
|
event = 0;
|
||||||
|
|||||||
+1
-1
@@ -2565,7 +2565,7 @@ ISR(TIMER0_COMP_vect, ISR_NOBLOCK) //10ms timer
|
|||||||
per10ms();
|
per10ms();
|
||||||
|
|
||||||
#if defined (PCBV4) && defined(SDCARD)
|
#if defined (PCBV4) && defined(SDCARD)
|
||||||
disk_timerproc();
|
sdPoll10mS();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(PCBV4)
|
#if !defined(PCBV4)
|
||||||
|
|||||||
+5
-3
@@ -909,15 +909,17 @@ enum AUDIO_SOUNDS {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SDCARD)
|
#if defined(SDCARD)
|
||||||
// TODO ailleurs
|
#include "sdcard.h"
|
||||||
#define FILENAME_MAXLEN 8
|
|
||||||
#include "gruvin9x/sdcard.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SOMO)
|
#if defined(SOMO)
|
||||||
#include "somo14d.h"
|
#include "somo14d.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PCBV4)
|
||||||
|
#include "rtc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// Re-useable byte array to save having multiple buffers
|
// Re-useable byte array to save having multiple buffers
|
||||||
#define SD_SCREEN_FILE_LENGTH (32)
|
#define SD_SCREEN_FILE_LENGTH (32)
|
||||||
union ReusableBuffer
|
union ReusableBuffer
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ static void init_main_ppm( uint32_t period, uint32_t out_enable )
|
|||||||
register Pio *pioptr ;
|
register Pio *pioptr ;
|
||||||
register Pwm *pwmptr ;
|
register Pwm *pwmptr ;
|
||||||
|
|
||||||
// TODO ? perOut(g_chans512, 0) ;
|
|
||||||
setupPulsesPPM() ;
|
setupPulsesPPM() ;
|
||||||
|
|
||||||
if ( out_enable )
|
if ( out_enable )
|
||||||
|
|||||||
@@ -34,14 +34,8 @@
|
|||||||
#ifndef sdcard_h
|
#ifndef sdcard_h
|
||||||
#define sdcard_h
|
#define sdcard_h
|
||||||
|
|
||||||
#include "../FatFs/ff.h"
|
#include "FatFs/ff.h"
|
||||||
#include "../FatFs/fattime.h"
|
#include "FatFs/fattime.h"
|
||||||
|
|
||||||
#if defined(PCBV4)
|
|
||||||
// TODO because this file is used for ersky9x
|
|
||||||
#include "rtc.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef SIMU
|
#ifdef SIMU
|
||||||
#define MODELS_PATH "."
|
#define MODELS_PATH "."
|
||||||
@@ -73,9 +67,7 @@ inline const pm_char *SDCARD_ERROR(FRESULT result)
|
|||||||
return STR_SDCARD_ERROR;
|
return STR_SDCARD_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MM/SD card Disk IO Support
|
extern void sdPoll10mS();
|
||||||
extern void disk_timerproc(void);
|
|
||||||
extern uint8_t g_ms100;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -320,6 +320,7 @@ const pm_char STR_DELETE_MODEL[] PROGMEM = TR_DELETE_MODEL;
|
|||||||
const pm_char STR_RESTORE_MODEL[] PROGMEM = TR_RESTORE_MODEL;
|
const pm_char STR_RESTORE_MODEL[] PROGMEM = TR_RESTORE_MODEL;
|
||||||
const pm_char STR_SDCARD_ERROR[] PROGMEM = TR_SDCARD_ERROR;
|
const pm_char STR_SDCARD_ERROR[] PROGMEM = TR_SDCARD_ERROR;
|
||||||
const pm_char STR_NO_SDCARD[] PROGMEM = TR_NO_SDCARD;
|
const pm_char STR_NO_SDCARD[] PROGMEM = TR_NO_SDCARD;
|
||||||
|
const pm_char STR_INCOMPATIBLE[] PROGMEM = TR_INCOMPATIBLE;
|
||||||
const pm_char STR_LOGS_PATH[] PROGMEM = LOGS_PATH;
|
const pm_char STR_LOGS_PATH[] PROGMEM = LOGS_PATH;
|
||||||
const pm_char STR_LOGS_EXT[] PROGMEM = LOGS_EXT;
|
const pm_char STR_LOGS_EXT[] PROGMEM = LOGS_EXT;
|
||||||
const pm_char STR_MODELS_PATH[] PROGMEM = MODELS_PATH;
|
const pm_char STR_MODELS_PATH[] PROGMEM = MODELS_PATH;
|
||||||
|
|||||||
@@ -395,6 +395,7 @@ extern const pm_char STR_DELETE_MODEL[];
|
|||||||
extern const pm_char STR_RESTORE_MODEL[];
|
extern const pm_char STR_RESTORE_MODEL[];
|
||||||
extern const pm_char STR_SDCARD_ERROR[];
|
extern const pm_char STR_SDCARD_ERROR[];
|
||||||
extern const pm_char STR_NO_SDCARD[];
|
extern const pm_char STR_NO_SDCARD[];
|
||||||
|
extern const pm_char STR_INCOMPATIBLE[];
|
||||||
extern const pm_char STR_LOGS_PATH[];
|
extern const pm_char STR_LOGS_PATH[];
|
||||||
extern const pm_char STR_LOGS_EXT[];
|
extern const pm_char STR_LOGS_EXT[];
|
||||||
extern const pm_char STR_MODELS_PATH[];
|
extern const pm_char STR_MODELS_PATH[];
|
||||||
|
|||||||
@@ -417,6 +417,7 @@
|
|||||||
#define TR_RESTORE_MODEL "Obnov Model"
|
#define TR_RESTORE_MODEL "Obnov Model"
|
||||||
#define TR_SDCARD_ERROR "Chyba SDkarty"
|
#define TR_SDCARD_ERROR "Chyba SDkarty"
|
||||||
#define TR_NO_SDCARD "Nen\204 SDkarta"
|
#define TR_NO_SDCARD "Nen\204 SDkarta"
|
||||||
|
#define TR_INCOMPATIBLE "Incompatible"
|
||||||
#define TR_WARNING "KONTROLA"
|
#define TR_WARNING "KONTROLA"
|
||||||
#define TR_EEPROMWARN "EEPROM"
|
#define TR_EEPROMWARN "EEPROM"
|
||||||
#define TR_THROTTLEWARN "PLYNU"
|
#define TR_THROTTLEWARN "PLYNU"
|
||||||
|
|||||||
@@ -416,7 +416,8 @@
|
|||||||
#define TR_DELETE_MODEL "Modell L\203schen" // TODO merged into DELETEMODEL?
|
#define TR_DELETE_MODEL "Modell L\203schen" // TODO merged into DELETEMODEL?
|
||||||
#define TR_RESTORE_MODEL "Modell Restore"
|
#define TR_RESTORE_MODEL "Modell Restore"
|
||||||
#define TR_SDCARD_ERROR "SDcard Error"
|
#define TR_SDCARD_ERROR "SDcard Error"
|
||||||
#define TR_NO_SDCARD "Keine SDcard"
|
#define TR_NO_SDCARD "Keine SDcard"
|
||||||
|
#define TR_INCOMPATIBLE "Incompatible"
|
||||||
#define TR_WARNING "WARNUNG"
|
#define TR_WARNING "WARNUNG"
|
||||||
#define TR_EEPROMWARN "EEPROM"
|
#define TR_EEPROMWARN "EEPROM"
|
||||||
#define TR_THROTTLEWARN "GAS"
|
#define TR_THROTTLEWARN "GAS"
|
||||||
|
|||||||
@@ -418,9 +418,11 @@
|
|||||||
#define TR_RESTORE_MODEL "Restore Model"
|
#define TR_RESTORE_MODEL "Restore Model"
|
||||||
#define TR_SDCARD_ERROR "SDCARD Error"
|
#define TR_SDCARD_ERROR "SDCARD Error"
|
||||||
#define TR_NO_SDCARD "No SDCARD"
|
#define TR_NO_SDCARD "No SDCARD"
|
||||||
|
#define TR_INCOMPATIBLE "Incompatible"
|
||||||
#define TR_WARNING "WARNING"
|
#define TR_WARNING "WARNING"
|
||||||
#define TR_EEPROMWARN "EEPROM"
|
#define TR_EEPROMWARN "EEPROM"
|
||||||
#define TR_THROTTLEWARN "THROTTLE"
|
#define TR_THROTTLEWARN "THROTTLE"
|
||||||
#define TR_ALARMSWARN "ALARMS"
|
#define TR_ALARMSWARN "ALARMS"
|
||||||
#define TR_SWITCHWARN "SWITCH"
|
#define TR_SWITCHWARN "SWITCH"
|
||||||
#define TR_INVERT_THR "Invert Thr?"
|
#define TR_INVERT_THR "Invert Thr?"
|
||||||
|
#define TR_INCOMPATIBLE_FILE
|
||||||
|
|||||||
@@ -416,6 +416,7 @@
|
|||||||
#define TR_RESTORE_MODEL "R\200storer Mod\201le"
|
#define TR_RESTORE_MODEL "R\200storer Mod\201le"
|
||||||
#define TR_SDCARD_ERROR "SDCARD Error"
|
#define TR_SDCARD_ERROR "SDCARD Error"
|
||||||
#define TR_NO_SDCARD "No SDCARD"
|
#define TR_NO_SDCARD "No SDCARD"
|
||||||
|
#define TR_INCOMPATIBLE "Incompatible"
|
||||||
#define TR_WARNING "ALERTE"
|
#define TR_WARNING "ALERTE"
|
||||||
#define TR_EEPROMWARN "EEPROM"
|
#define TR_EEPROMWARN "EEPROM"
|
||||||
#define TR_THROTTLEWARN "GAZ"
|
#define TR_THROTTLEWARN "GAZ"
|
||||||
|
|||||||
@@ -417,6 +417,7 @@
|
|||||||
#define TR_RESTORE_MODEL "Ripr. Modello"
|
#define TR_RESTORE_MODEL "Ripr. Modello"
|
||||||
#define TR_SDCARD_ERROR "Errore SD"
|
#define TR_SDCARD_ERROR "Errore SD"
|
||||||
#define TR_NO_SDCARD "No SDCARD"
|
#define TR_NO_SDCARD "No SDCARD"
|
||||||
|
#define TR_INCOMPATIBLE "Incompatible"
|
||||||
#define TR_WARNING "AVVISO"
|
#define TR_WARNING "AVVISO"
|
||||||
#define TR_EEPROMWARN "EEPROM"
|
#define TR_EEPROMWARN "EEPROM"
|
||||||
#define TR_THROTTLEWARN "MOTORE"
|
#define TR_THROTTLEWARN "MOTORE"
|
||||||
|
|||||||
@@ -415,6 +415,7 @@
|
|||||||
#define TR_RESTORE_MODEL "\203terst\201ll Modell"
|
#define TR_RESTORE_MODEL "\203terst\201ll Modell"
|
||||||
#define TR_SDCARD_ERROR "SDCARD-fel"
|
#define TR_SDCARD_ERROR "SDCARD-fel"
|
||||||
#define TR_NO_SDCARD "SDCARD saknas"
|
#define TR_NO_SDCARD "SDCARD saknas"
|
||||||
|
#define TR_INCOMPATIBLE "Incompatible"
|
||||||
#define TR_WARNING "VARNING"
|
#define TR_WARNING "VARNING"
|
||||||
#define TR_EEPROMWARN "EEPROM"
|
#define TR_EEPROMWARN "EEPROM"
|
||||||
#define TR_THROTTLEWARN "GAS"
|
#define TR_THROTTLEWARN "GAS"
|
||||||
|
|||||||
Reference in New Issue
Block a user