Files
roro9stack/src/apps/firmware_page.h
T
twislaandClaude Opus 5.5 4e439410cd Stop IRC by hand; remove mDNS
IrcService::disconnect() stops the session from any state: QUIT if
connected, then no more retries. /quit goes through it (before, it only
stopped a connected session; while waiting for Wi-Fi or retrying it did
nothing), and so does the new `irc stop` command. Stopped by hand,
opening the IRC App no longer reconnects; typing a line does.

mDNS is gone: it never crossed the dev box's routed network, and it
cost about 7.5 KB of RAM. Pushes go to the IP shown in Settings ->
Firmware, which drops its Name row. OTA Q54 records the change.

On the device, Debug Build: 105.6 KB free with Wi-Fi (was 98); with IRC
on TLS 54 KB free (was 46); after `irc stop`, back to 99 KB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
2026-10-04 23:17:48 +02:00

48 lines
1.2 KiB
C++

#pragma once
#include <memory>
#include <mutex>
#include <string>
#include <vector>
#include "dialog_model.h"
#include "key_event.h"
#include "list_model.h"
#include "services/storage_service.h"
#include "services/update_service.h"
#include "services/wifi_service.h"
#include "ui/canvas.h"
#include "ui/theme.h"
namespace roro {
// Settings → Firmware: the running version and its Probation, where to push Firmware Updates, and
// the Update Files on the SD card (in /updates) to install from.
class FirmwarePage {
public:
FirmwarePage(UpdateService& update, WifiService& wifi, StorageService& storage)
: update_(update), wifi_(wifi), storage_(storage) {}
void enter();
bool onKey(const KeyEvent& e); // false: leave the page
void draw(Canvas& c);
private:
enum Row { kVersion, kStatus, kAddress, kSdHeader, kFixed };
std::vector<std::string> files();
UpdateService& update_;
WifiService& wifi_;
StorageService& storage_;
ListModel list_{theme::kContent.h / theme::kLineHeight};
std::unique_ptr<DialogModel> confirm_;
// Filled on the storage task.
std::mutex lock_;
std::vector<std::string> files_;
bool listed_ = false;
};
} // namespace roro