Skip to content

Commit 68da261

Browse files
authored
Merge pull request #204 from SHA2017-badge/basvs-push-sponsors
push sponsors app
2 parents c0a80d2 + 02d3da6 commit 68da261

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

esp32/modules/post_ota.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ def u0to1():
55
create.boot()
66
easydraw.msg("Applied patch 1")
77

8+
def u1to2():
9+
badge.nvs_set_u8('sponsors', 'shown', 0)
10+
easydraw.msg("Applied patch 2")
11+
812
# Read current patch level
913
lvl = badge.nvs_get_u8('ota', 'fixlvl', 0)
1014

@@ -13,3 +17,9 @@ def u0to1():
1317
u0to1()
1418
easydraw.msg("Post OTA update completed")
1519
badge.nvs_set_u8('ota', 'fixlvl', 1)
20+
21+
if lvl<2:
22+
easydraw.msg("Running post OTA scripts...","Still updating anyways...",)
23+
u1to2()
24+
easydraw.msg("Post OTA update completed")
25+
badge.nvs_set_u8('ota', 'fixlvl', 2)

esp32/modules/tasks/sponsorscheck.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ def show(force=False):
2626
print("[SPONSORS] Current version: "+str(version))
2727
except:
2828
print("[SPONSORS] Not installed!")
29-
if version>=14:
30-
needToInstall = False
31-
if needToInstall:
32-
install()
3329
try:
30+
if version>=16:
31+
needToInstall = False
32+
if needToInstall:
33+
install()
3434
with open("/lib/sponsors/version", "r") as f:
3535
version = int(f.read(99))
3636
# Now we know for sure that a version of the sponsors app has been installed

0 commit comments

Comments
 (0)