feat: truth-first get_ap (dual radio + enterprise) and derived pineap mode

get_ap now reports radio0, radio1 and enterprise APs separately from UCI
(never a stored/cached branch), with radio channel fallback. Mode is
derived from live enabled/collect state instead of showing 'unknown';
device truth wins over stale stored presets.
This commit is contained in:
2026-08-18 19:25:06 -05:00
parent 2901234d94
commit c1d47e517c
4 changed files with 123 additions and 81 deletions
+2 -1
View File
@@ -109,7 +109,8 @@ class PineapModeTest(unittest.TestCase):
server.daemon_sock_call = fake
status, payload = server.h_pineap_mode_get(ctx())
self.assertEqual(status, 200)
self.assertEqual(payload['mode'], 'advanced')
# Device truth wins: engine off means the device IS passive now.
self.assertEqual(payload['mode'], 'passive')
self.assertFalse(payload['enabled'])
def test_manual_mimic_change_marks_advanced(self):