mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-02 01:08:27 +00:00
1. USB takeover opcode mismatch ZephyrCompanionUSB.cpp checked payload[0] == 0x03 with a comment claiming CMD_APP_START, but CMD_APP_START is 0x01 (0x03 is CMD_SEND_CHANNEL_TXT_MSG). The USB handshake silently dropped the companion app's first frame on every connection; the app appeared broken over USB until the user happened to send a channel message. 2. CMD_SET_ADVERT_NAME didn't propagate to BLE adv data Name changes were persisted to prefs but the advertising payload and GATT device name kept the old value until reboot. Added zephcore_ble_update_name() and called it from the handler. 3. No advertising-health watchdog If bt_le_adv_start() ever failed transiently (HCI timeout, controller pacing), the device would silently stop advertising and stay undiscoverable until reboot. Added an adv_running flag and a 5s watchdog in the companion housekeeping handler that nudges adv back on if it stops outside a connection. Tracks Arduino nrf52's equivalent 10s watchdog.