| 3612 | } |
| 3613 | |
| 3614 | void AutoResearchRemoteControl::tick(uint32_t current_millis) { |
| 3615 | if (mRemote) { |
| 3616 | // Remote::update() does pull + tick + push |
| 3617 | mRemote->update(current_millis); |
| 3618 | } |
| 3619 | if (mBleRemote) { |
| 3620 | mBleRemote->update(current_millis); |
| 3621 | } |
| 3622 | // Deferred BLE teardown: stopBle RPC sets this flag so the response |
| 3623 | // is sent (via push() above) before we call ble::destroyTransport(). |
| 3624 | if (mPendingBleStop) { |
| 3625 | mPendingBleStop = false; |
| 3626 | mBleRemote.reset(); // destroy lambdas before freeing state they capture |
| 3627 | fl::net::ble::destroyTransport(mBleState); |
| 3628 | mBleState = nullptr; |
| 3629 | mState->ble_server_active = false; |
| 3630 | getBleState().ble_server_active = false; |
| 3631 | FL_WARN("[BLE] Deferred teardown complete"); |
| 3632 | } |
| 3633 | } |
| 3634 | |
| 3635 | void AutoResearchRemoteControl::registerAllMethods(fl::Remote* remote) { |
| 3636 | // Register the core methods that BLE remote needs. |
no test coverage detected