Cosmetic changes

This commit is contained in:
Elfish
2023-04-03 14:41:49 +02:00
parent 0ca49bd407
commit 54f8ef6a58
3 changed files with 51 additions and 50 deletions

View File

@@ -225,12 +225,10 @@ void printAllowedIds()
bool loadBeaconSettings()
{
Serial.println("laodSettings");
File file = LittleFS.open("/beacons.json", "r");
if (!file)
Serial.println("loadSettings");
if (LittleFS.exists("/beacons.json"))
{
return false;
}
File file = LittleFS.open("/beacons.json", "r");
DynamicJsonDocument doc(128);
DeserializationError error = deserializeJson(doc, file);
if (error)
@@ -271,7 +269,12 @@ bool loadBeaconSettings()
return true;
file.close();
}
}
else
{
return false;
}
}
void BeaconScanner_::setup()
{

View File

@@ -90,7 +90,6 @@ void loadSettings()
#endif
SOUND_ACTIVE = Settings.getBool("SOUND", true);
#ifndef ULANZI
// Settings.putUInt("VOL", VOLUME_PERCENT);
VOLUME_PERCENT = Settings.getUInt("VOL", 50);
VOLUME = map(VOLUME_PERCENT, 0, 100, 0, 30);
#endif

View File

@@ -93,13 +93,12 @@ PeripheryManager_ &PeripheryManager = PeripheryManager.getInstance();
void left_button_pressed()
{
#ifdef AWTRIX_UPGRADE
#ifndef ULANZI
PeripheryManager.playFromFile(DFMINI_MP3_CLICK);
#endif
if (AP_MODE)
{
#ifdef AWTRIX_UPGRADE
#ifndef ULANZI
--MATRIX_LAYOUT;
if (MATRIX_LAYOUT < 0)
MATRIX_LAYOUT = 2;
@@ -116,12 +115,12 @@ void left_button_pressed()
void right_button_pressed()
{
#ifdef AWTRIX_UPGRADE
#ifndef ULANZI
PeripheryManager.playFromFile(DFMINI_MP3_CLICK);
#endif
if (AP_MODE)
{
#ifdef AWTRIX_UPGRADE
#ifndef ULANZI
++MATRIX_LAYOUT;
if (MATRIX_LAYOUT > 2)
MATRIX_LAYOUT = 0;
@@ -138,7 +137,7 @@ void right_button_pressed()
void select_button_pressed()
{
#ifdef AWTRIX_UPGRADE
#ifndef ULANZI
PeripheryManager.playFromFile(DFMINI_MP3_CLICK);
#endif
DisplayManager.selectButton();