build for esp32 mask project
This commit is contained in:
@@ -137,7 +137,7 @@ protected:
|
||||
void setEvent(InputEvent::Intent intent, Variant &&v);
|
||||
|
||||
private:
|
||||
Ringbuf<InputEvent, 5> m_eventQueue;
|
||||
Ringbuf<InputEvent, 12> m_eventQueue;
|
||||
};
|
||||
|
||||
class InputMapper: public BufferedInputSource {
|
||||
@@ -157,12 +157,20 @@ class OnlineTaskMixin : public virtual Loopable {
|
||||
void handleEvent(const InputEvent &evt) override {
|
||||
if (evt.intent == InputEvent::NetworkStatus) {
|
||||
m_online = evt.asInt();
|
||||
if (m_online) {
|
||||
onOnline();
|
||||
} else {
|
||||
onOffline();
|
||||
}
|
||||
}
|
||||
if (m_online) {
|
||||
handleEventOnline(evt);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void onOnline() {}
|
||||
virtual void onOffline() {}
|
||||
|
||||
virtual void handleEventOnline(const InputEvent &evt) {}
|
||||
|
||||
void loop() override {
|
||||
|
Reference in New Issue
Block a user