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

@ -150,13 +150,8 @@ bool worthRoaming(bool connected, int currentRssi, int apRssi, int minGain) {
bool otaProven(bool networkUp, unsigned long uptimeMs, unsigned long minUptimeMs) {
return networkUp && uptimeMs >= minUptimeMs;
}
bool releaseAssetName(char *buf, size_t size, const char *kind, const char *chip) {
int n = snprintf(buf, size, "SomfyController.%s.%s.bin", kind, chip);
return n >= 0 && (size_t)n < size;
}
bool isFsAsset(const char *name) {
size_t len = strlen(name);
return strstr(name, ".littlefs.") && len >= 4 && strcmp(name + len - 4, ".bin") == 0;
void releaseAssetName(char *buf, size_t size, const char *kind, const char *chipModel) {
snprintf(buf, size, "SomfyController.%s.esp32%s.bin", kind, chipModel);
}
const char *wifiAuthModeName(uint8_t authMode) {
switch(authMode) {