refactor: name release assets from the board's chip model

Review follow-up for #72.

- releaseAssetName() takes ConfigSettings::chipModel ("", "s3", "c3", "c6"),
  so GitOTA no longer keeps its own chip switch. C3 keeps its name for when
  the build comes back.
- hasFS is set only when this board's own LittleFS image is in the release.
  isFsAsset() is gone; it also matched the old unsuffixed littlefs.bin, which
  the updater no longer asks for.
- releaseAssetName() returns void: no caller checked the result and every
  name fits currentFile.
- Both manual-upload hints name this board's file.
- KNOWN_ISSUES: the "Main" install can't work, the repo holds no .bin files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-20 21:34:16 +02:00
parent ab7eae3d94
commit 8196bd20e6
6 changed files with 35 additions and 55 deletions

View file

@ -4834,7 +4834,8 @@ class Firmware {
updateFirmware() {
let div = this.createFileUploader('/updateFirmware');
let inst = div.querySelector('div[id=divInstText]');
let html = '<div style="font-size:14px;margin-bottom:20px;">Select a binary file [SomfyController.ino.esp32.bin] containing the device firmware then press the Upload File button.</div>';
let chip = document.getElementById('divContainer').getAttribute('data-chipmodel') || '';
let html = `<div style="font-size:14px;margin-bottom:20px;">Select a binary file [SomfyController.ino.esp32${chip}.bin] containing the device firmware then press the Upload File button.</div>`;
if (this.isMobile()) {
html += `<div style="width:100%;color:red;text-align:center;font-weight:bold;"><span style="margin-top:7px;width:100%;background:yellow;padding:3px;display:inline-block;border-radius:5px;background:white;">WARNING<span></div>`;
html += '<hr/><div style="font-size:14px;margin-bottom:10px;">This browser does not support automatic backups. It is highly recommended that you back up your configuration using the backup button before proceeding.</div>';
@ -4849,7 +4850,8 @@ class Firmware {
let div = this.createFileUploader('/updateApplication');
general.reloadApp = true;
let inst = div.querySelector('div[id=divInstText]');
inst.innerHTML = '<div style="font-size:14px;">Select a binary file [SomfyController.littlefs.&lt;chip&gt;.bin, e.g. SomfyController.littlefs.esp32.bin] containing the littlefs data for the application then press the Upload File button.</div>';
let chip = document.getElementById('divContainer').getAttribute('data-chipmodel') || '';
inst.innerHTML = `<div style="font-size:14px;">Select a binary file [SomfyController.littlefs.esp32${chip}.bin] containing the littlefs data for the application then press the Upload File button.</div>`;
if (this.isMobile()) {
inst.innerHTML += `<div style="width:100%;color:red;text-align:center;font-weight:bold;"><span style="margin-top:7px;width:100%;background:yellow;padding:3px;display:inline-block;border-radius:5px;background:white;">WARNING<span></div>`;
inst.innerHTML += '<hr/><div style="font-size:14px;margin-bottom:10px;">This browser does not support automatic backups. It is highly recommended that you back up your configuration using the backup button before proceeding.</div>';