Load EEPROM settings immediately, and load defaults prior to loading EEPROM values so that we fall back on defaults rather than 0's

This commit is contained in:
Reed Nightingale 2020-01-13 23:38:12 -08:00
parent f329950b6e
commit 227cbe9b07
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,6 @@ void displayInit(void){
tft.setRotation(1); tft.setRotation(1);
xpt2046_Init(); xpt2046_Init();
readTouchCalibration();
} }
void displayPixel(unsigned int x, unsigned int y, unsigned int c){ void displayPixel(unsigned int x, unsigned int y, unsigned int c){

View File

@ -420,6 +420,7 @@ void doRIT(){
* variables. * variables.
*/ */
void initSettings(){ void initSettings(){
LoadDefaultSettings();
LoadSettingsFromEeprom(); LoadSettingsFromEeprom();
} }
@ -461,8 +462,8 @@ void setup()
Serial.begin(38400); Serial.begin(38400);
Serial.flush(); Serial.flush();
displayInit();
initSettings(); initSettings();
displayInit();
initPorts(); initPorts();
initOscillators(); initOscillators();
setFrequency(globalSettings.vfoA.frequency); setFrequency(globalSettings.vfoA.frequency);