Skip to content

[Bug]: Unnecessary actions are performed by ExternalNotificationModule #8885

@polarikus

Description

@polarikus

Category

Other

Hardware

Not Applicable

Is this bug report about any UI component firmware like InkHUD or Meshtatic UI (MUI)?

  • Meshtastic UI aka MUI colorTFT
  • InkHUD ePaper
  • OLED slide UI on any display

Firmware Version

2.7.15.567b8ea

Description

  1. In InputBroker::handleInputEvent(const InputEvent *event) there's handling to stop externalNotificationModule->stopNow(). Subsequently, this->notifyObservers(event) is called, after which the method externalNotificationModule->stopNow() is called again in the externalNotificationModule itself, in the method ExternalNotificationModule::handleInputEvent(const InputEvent *event).It seems that the handling in InputBroker is not required.
  2. powerFSM.trigger executes on long presses, there's even a TODO note about this.

Relevant log output

int InputBroker::handleInputEvent(const InputEvent *event)
{
    if (isNeedTriggerPowerFSM(event)) {
        LOG_DEBUG("InputBroker: NeedTriggerPowerFSM");
        powerFSM.trigger(EVENT_INPUT); // todo: not every input should wake, like long hold release
    }

    if (event && event->inputEvent != INPUT_BROKER_NONE && externalNotificationModule &&
        moduleConfig.external_notification.enabled) {
        externalNotificationModule->stopNow();
    }


    this->notifyObservers(event);
    return 0;
}



int ExternalNotificationModule::handleInputEvent(const InputEvent *event)
{
    if (nagCycleCutoff != UINT32_MAX) {
        stopNow();
        return 1;
    }
    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions