|
@ -476,6 +476,10 @@ void IRAM_ATTR onTimer() { |
|
|
// Get last RFID-tag applied from NVS
|
|
|
// Get last RFID-tag applied from NVS
|
|
|
void recoverLastRfidPlayed(void) { |
|
|
void recoverLastRfidPlayed(void) { |
|
|
if (recoverLastRfid) { |
|
|
if (recoverLastRfid) { |
|
|
|
|
|
if (operationMode == OPMODE_BLUETOOTH) { // Don't recover if BT-mode is desired
|
|
|
|
|
|
recoverLastRfid = false; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
recoverLastRfid = false; |
|
|
recoverLastRfid = false; |
|
|
String lastRfidPlayed = prefsSettings.getString("lastRfid", "-1"); |
|
|
String lastRfidPlayed = prefsSettings.getString("lastRfid", "-1"); |
|
|
if (!lastRfidPlayed.compareTo("-1")) { |
|
|
if (!lastRfidPlayed.compareTo("-1")) { |
|
@ -2800,14 +2804,6 @@ void trackQueueDispatcher(const char *_itemToPlay, const uint32_t _lastPlayPos, |
|
|
// Modification-cards can change some settings (e.g. introducing track-looping or sleep after track/playlist).
|
|
|
// Modification-cards can change some settings (e.g. introducing track-looping or sleep after track/playlist).
|
|
|
// This function handles them.
|
|
|
// This function handles them.
|
|
|
void doRfidCardModifications(const uint32_t mod) { |
|
|
void doRfidCardModifications(const uint32_t mod) { |
|
|
#ifdef PLAY_LAST_RFID_AFTER_REBOOT
|
|
|
|
|
|
if (recoverLastRfid) { |
|
|
|
|
|
recoverLastRfid = false; |
|
|
|
|
|
// We don't want to remember modification-cards
|
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
doCmdAction(mod); |
|
|
doCmdAction(mod); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -3404,6 +3400,7 @@ void accessPointStart(const char *SSID, IPAddress ip, IPAddress netmask) { |
|
|
accessPointStarted = true; |
|
|
accessPointStarted = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Reads stored WiFi-status from NVS
|
|
|
// Reads stored WiFi-status from NVS
|
|
|
bool getWifiEnableStatusFromNVS(void) { |
|
|
bool getWifiEnableStatusFromNVS(void) { |
|
|
uint32_t wifiStatus = prefsSettings.getUInt("enableWifi", 99); |
|
|
uint32_t wifiStatus = prefsSettings.getUInt("enableWifi", 99); |
|
@ -3443,10 +3440,14 @@ bool writeWifiStatusToNVS(bool wifiStatus) { |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Reads from NVS, if bluetooth or "normal" mode is desired
|
|
|
uint8_t readOperationModeFromNVS(void) { |
|
|
uint8_t readOperationModeFromNVS(void) { |
|
|
return prefsSettings.getUChar("operationMode", OPMODE_NORMAL); |
|
|
return prefsSettings.getUChar("operationMode", OPMODE_NORMAL); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Writes to NVS, if bluetooth or "normal" mode is desired
|
|
|
bool setOperationMode(uint8_t newOperationMode) { |
|
|
bool setOperationMode(uint8_t newOperationMode) { |
|
|
uint8_t currentOperationMode = prefsSettings.getUChar("operationMode", OPMODE_NORMAL); |
|
|
uint8_t currentOperationMode = prefsSettings.getUChar("operationMode", OPMODE_NORMAL); |
|
|
if(currentOperationMode != newOperationMode) { |
|
|
if(currentOperationMode != newOperationMode) { |
|
|