upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/CHECKLIST.md
diff options
context:
space:
mode:
Diffstat (limited to 'CHECKLIST.md')
-rw-r--r--CHECKLIST.md34
1 files changed, 17 insertions, 17 deletions
diff --git a/CHECKLIST.md b/CHECKLIST.md
index dd21b0c..5cedd30 100644
--- a/CHECKLIST.md
+++ b/CHECKLIST.md
@@ -192,29 +192,29 @@
192## Phase 4: ESP32 TollGate Client Detection + Auto-Payment — IN PROGRESS 192## Phase 4: ESP32 TollGate Client Detection + Auto-Payment — IN PROGRESS
193 193
194### tollgate_client.c/h (New) 194### tollgate_client.c/h (New)
195- [ ] Create `tollgate_client.h` — types: `tollgate_discovery_t`, `tollgate_client_state_t` enum (IDLE/DETECTING/NEEDS_PAY/PAYING/PAID/RENEWING) 195- [x] Create `tollgate_client.h` — types: `tollgate_discovery_t`, `tollgate_client_state_t` enum (IDLE/DETECTING/NEEDS_PAY/PAYING/PAID/RENEWING)
196- [ ] Create `tollgate_client.c` — detection, payment, monitoring, state machine 196- [x] Create `tollgate_client.c` — detection, payment, monitoring, state machine
197- [ ] `tollgate_client_detect(gw_ip)` — HTTP GET `http://{gw}:2121/`, parse kind=10021, extract price tags 197- [x] `tollgate_client_detect(gw_ip)` — HTTP GET `http://{gw}:2121/`, parse kind=10021, extract price tags
198- [ ] `tollgate_client_pay(gw_ip, amount_sats)` — `nucula_wallet_send()` → POST to upstream → parse kind=1022/21023 198- [x] `tollgate_client_pay(gw_ip, amount_sats)` — `nucula_wallet_send()` → POST to upstream → parse kind=1022/21023
199- [ ] `tollgate_client_on_sta_connected()` — extract gw from DHCP, detect, pay (blocking) 199- [x] `tollgate_client_on_sta_connected()` — extract gw from DHCP, detect, pay (blocking)
200- [ ] `tollgate_client_tick()` — GET `/usage`, renew at 20% remaining 200- [x] `tollgate_client_tick()` — GET `/usage`, renew at 20% remaining
201- [ ] `tollgate_client_on_sta_disconnected()` — reset state 201- [x] `tollgate_client_on_sta_disconnected()` — reset state
202- [ ] `tollgate_client_get_usage(gw_ip)` — GET `/usage` → parse remaining/total 202- [x] `tollgate_client_get_usage(gw_ip)` — GET `/usage` → parse remaining/total
203 203
204### Config Changes 204### Config Changes
205- [ ] Add to `config.h`: `client_enabled`, `client_steps_to_buy`, `client_renewal_threshold_pct`, `client_retry_interval_ms` 205- [x] Add to `config.h`: `client_enabled`, `client_steps_to_buy`, `client_renewal_threshold_pct`, `client_retry_interval_ms`
206- [ ] Parse new fields in `config.c` 206- [x] Parse new fields in `config.c`
207 207
208### Integration (tollgate_main.c) 208### Integration (tollgate_main.c)
209- [ ] Make wallet init synchronous (call `nucula_wallet_init()` directly, not as task) 209- [x] Make wallet init synchronous (call `nucula_wallet_init()` directly, not as task)
210- [ ] Add `tollgate_client_on_sta_connected()` in `ip_event_handler` (blocking, before `start_services()`) 210- [x] Add `tollgate_client_on_sta_connected()` in `ip_event_handler` (blocking, before `start_services()`)
211- [ ] Add `tollgate_client_on_sta_disconnected()` in `wifi_event_handler` 211- [x] Add `tollgate_client_on_sta_disconnected()` in `wifi_event_handler`
212- [ ] Add `tollgate_client_tick()` in main loop 212- [x] Add `tollgate_client_tick()` in main loop
213- [ ] Update `main/CMakeLists.txt` — add `tollgate_client.c` 213- [x] Update `main/CMakeLists.txt` — add `tollgate_client.c`
214 214
215### Unit Tests 215### Unit Tests
216- [ ] `tests/unit/test_tollgate_client.c` — discovery parsing, price extraction, state machine, renewal threshold 216- [x] `tests/unit/test_tollgate_client.c` — discovery parsing, price extraction, state machine, renewal threshold
217- [ ] All unit tests passing 217- [x] All unit tests passing (30 new, 116 total) — committed at `78dd599`
218 218
219### Integration Tests 219### Integration Tests
220- [ ] ESP32→OpenWRT auto-payment (Scenario 4) 220- [ ] ESP32→OpenWRT auto-payment (Scenario 4)