Skip to content

Commit

Permalink
added 'jaam' firmware url handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Foroxon committed Dec 23, 2024
1 parent 800134b commit bcbdaa7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions deploy/update_server/update_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,17 @@ async def update(request):
)
filenames = [filename for filename in filenames if not filename.startswith("4.")]
return FileResponse(f"{shared_path}/{filenames[0]}")
if request.path_params["filename"] == "jaam":
filenames = sorted(
[
file
for file in os.listdir(shared_path)
if (os.path.isfile(os.path.join(shared_path, file)) and file.endswith(".bin"))
],
key=bin_sort,
reverse=True,
)
return FileResponse(f"{shared_path}/{filenames[0]}")
return FileResponse(f'{shared_path}/{request.path_params["filename"]}.bin')


Expand All @@ -126,6 +137,17 @@ async def update_beta(request):
)
filenames = [filename for filename in filenames if not filename.startswith("4.")]
return FileResponse(f"{shared_beta_path}/{filenames[0]}")
if request.path_params["filename"] == "jaam_beta":
filenames = sorted(
[
file
for file in os.listdir(shared_path)
if (os.path.isfile(os.path.join(shared_path, file)) and file.endswith(".bin"))
],
key=bin_sort,
reverse=True,
)
return FileResponse(f"{shared_path}/{filenames[0]}")
return FileResponse(f'{shared_beta_path}/{request.path_params["filename"]}.bin')


Expand Down
2 changes: 1 addition & 1 deletion updater/src/updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const char* userSsid = ""; // WIFI-мережа замовника
const char* userPassword = ""; // Пароль до WIFI мережі замовника


const char* firmwareUrl = "";
const char* firmwareUrl = "http://jaam.net.ua:2095/jaam.bin";

String identifier = "github";

Expand Down

0 comments on commit bcbdaa7

Please sign in to comment.