FastLED 3.9.15
Loading...
Searching...
No Matches

◆ tick()

void AutoResearchRemoteControl::tick ( uint32_t current_millis)

Process RPC system (pull + tick + push)

Parameters
current_millisCurrent timestamp in milliseconds
Note
This function is automatically called by the async task registered in setup()

Definition at line 3614 of file AutoResearchRemote.cpp.

3614 {
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
3628 mBleState = nullptr;
3629 mState->ble_server_active = false;
3631 FL_WARN("[BLE] Deferred teardown complete");
3632 }
3633}
AutoResearchBleState & getBleState()
Get current BLE autoresearch state.
fl::net::ble::TransportState * mBleState
fl::unique_ptr< fl::Remote > mBleRemote
fl::shared_ptr< AutoResearchState > mState
fl::unique_ptr< fl::Remote > mRemote
#define FL_WARN(X)
Definition log.h:276
void destroyTransport(TransportState *) FL_NOEXCEPT
Deinitialize BLE stack and free heap state.
Definition ble.cpp.hpp:26

References AutoResearchBleState::ble_server_active, fl::net::ble::destroyTransport(), FL_WARN, getBleState(), mBleRemote, mBleState, mPendingBleStop, mRemote, and mState.

Referenced by autoresearch::setupRpcAsyncTask().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: