Skip to content

Commit

Permalink
v0.94
Browse files Browse the repository at this point in the history
  • Loading branch information
Blueforcer committed Dec 30, 2023
1 parent 5091803 commit 151a98c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The JSON object has the following properties:
| `dfplayer` | boolean | Enables DFPLayer for Awtrix2_conversation builds. | false |
| `button_callback` | string | http callback url for button presses. | - |
| `let_it_snow` | boolean | Let it snow as a global Overlay. | true for christmastime |

| `new_year` | boolean | Displays fireworks and plays a jingle at newyear. | false |

#### Example:
```json
Expand All @@ -45,4 +45,4 @@ The JSON object has the following properties:
"hum_offset":-2,
"let_it_snow": true
}
```
```
3 changes: 2 additions & 1 deletion src/DisplayManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,8 @@ void DisplayManager_::tick()
}
}

DisplayManager.checkNewYear();
if (NEWYEAR)
DisplayManager.checkNewYear();
}

bool newYearEventTriggered = false;
Expand Down
1 change: 0 additions & 1 deletion src/GameManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ struct PlayerStats
PlayerStats() : x(0), y(0), isJumping(false), verticalSpeed(0), color(0xFFFFFF) {}
} GamePlayer;

// Globale Variablen für Spielzustand
Direction dir = NONE;
bool pressed = false;
bool jumpButtonPressed = false;
Expand Down
10 changes: 8 additions & 2 deletions src/Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,16 @@ void loadDevSettings()
DEBUG_MODE = doc["debug_mode"].as<bool>();
}

if (doc.containsKey("let_it_snow"))
if (doc.containsKey("let_it_snow"))
{
SNOW = doc["let_it_snow"].as<bool>();
}

if (doc.containsKey("new_year"))
{
NEWYEAR = doc["new_year"].as<bool>();
}

if (doc.containsKey("button_callback"))
{
BUTTON_CALLBACK = doc["button_callback"].as<String>();
Expand Down Expand Up @@ -321,7 +326,7 @@ IPAddress gateway;
IPAddress subnet;
IPAddress primaryDNS;
IPAddress secondaryDNS;
const char *VERSION = "0.93";
const char *VERSION = "0.94";

String MQTT_HOST = "";
uint16_t MQTT_PORT = 1883;
Expand Down Expand Up @@ -430,6 +435,7 @@ String AUTH_USER = "";
String AUTH_PASS = "awtrix";
String BUTTON_CALLBACK = "";
bool SNOW = false;
bool NEWYEAR = false;
float LDR_GAMMA = 3.0;
float LDR_FACTOR = 1.0;
bool GAME_ACTIVE = false;
1 change: 1 addition & 0 deletions src/Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@ extern String AUTH_USER;
extern String AUTH_PASS;
extern String BUTTON_CALLBACK;
extern bool SNOW;
extern bool NEWYEAR;
extern bool GAME_ACTIVE;
#endif // Globals_H

0 comments on commit 151a98c

Please sign in to comment.