Add the M1 milestone tree under poc/ (m1_hardware + poc_a apps, shared common components, evidence schema). Merges the plan's 'm1 baseline+fixes' and 'wifi provisioning' batches: the poc/ tree is entirely untracked and both concerns share files. M1 hardware baseline: - landscape ST7305 RIP display via LVGL I1 driver - TF-card status log: JSONL telemetry with CRC32C per line; append buffer widened to line[640] after the 512-byte truncation defect (payload ~550B with real values) was root-caused on-device - PCF85063 RTC read, SHTC3 temperature/humidity with plausibility checks, KEY input with short/long/portal press thresholds - boot-time partition identity check and M1-002 boot record fields (device_id, image_sha256, reset_reason, services status) WiFi web provisioning: - softAP portal Frame-Setup-xxxx with HTTP endpoints /scan, /connect, /clear; httpd handlers never call httpd_stop (deadlock hazard) — a 1s monitor task executes stop/start/connect actions - credentials persist to system_fs wifi.json (littlefs) per the SEC-010 development exception (plaintext, documented in _doc) - fallback: 5 disconnects without IP or 60s no-IP -> stop retry, portal returns; GOT_IP tears the AP down - KEY >=3s hold requests the portal; prov start/stop/status console commands; ap_active/ap_mode_requested surfaces in status JSON/text Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]>
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
#include "esp_err.h"
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
#include "lvgl.h"
|
|
|
|
#include "hardware_status.hh"
|
|
#include "st7305_panel.hh"
|
|
|
|
namespace frame::m1 {
|
|
|
|
class display_service {
|
|
public:
|
|
explicit display_service(hardware_status& status) : status_(status) {}
|
|
|
|
display_service(const display_service&) = delete;
|
|
display_service& operator=(const display_service&) = delete;
|
|
|
|
esp_err_t start();
|
|
|
|
private:
|
|
static void task_entry(void* context);
|
|
static void flush(lv_display_t* display, const lv_area_t* area, uint8_t* pixels);
|
|
esp_err_t initialize_lvgl();
|
|
void render_status(const status_snapshot& value);
|
|
void run();
|
|
|
|
hardware_status& status_;
|
|
st7305_panel panel_{};
|
|
lv_display_t* display_{};
|
|
lv_obj_t* health_label_{};
|
|
lv_obj_t* platform_label_{};
|
|
lv_obj_t* peripherals_label_{};
|
|
lv_obj_t* network_label_{};
|
|
lv_obj_t* memory_label_{};
|
|
uint8_t* framebuffer_{};
|
|
uint8_t* draw_buffer_one_{};
|
|
uint8_t* draw_buffer_two_{};
|
|
TaskHandle_t task_{};
|
|
};
|
|
|
|
} // namespace frame::m1
|