Merge remote-tracking branch 'origin/develop'

This commit is contained in:
Ben Meadors
2026-02-28 09:39:25 -06:00
2 changed files with 24 additions and 4 deletions
+16 -1
View File
@@ -100,13 +100,28 @@ void InputBroker::processInputEventQueue()
int InputBroker::handleInputEvent(const InputEvent *event)
{
powerFSM.trigger(EVENT_INPUT); // todo: not every input should wake, like long hold release
#if HAS_SCREEN
bool screenWasOff = false;
if (screen) {
screenWasOff = !screen->isScreenOn();
}
#endif
powerFSM.trigger(EVENT_INPUT);
if (event && event->inputEvent != INPUT_BROKER_NONE && externalNotificationModule &&
moduleConfig.external_notification.enabled && externalNotificationModule->nagging()) {
externalNotificationModule->stopNow();
// If this turns off a notification, don't further process the event
return 0;
}
#if HAS_SCREEN
if (screen && screenWasOff) {
// If the screen was off, it is in the process of turning on, and we just drop the event
return 0;
}
#endif
this->notifyObservers(event);
return 0;
}
+8 -3
View File
@@ -53,6 +53,9 @@ static uint8_t bytes[meshtastic_MqttClientProxyMessage_size + 30]; // 12 for cha
static bool isMqttServerAddressPrivate = false;
static bool isConnected = false;
static uint32_t lastPositionUnavailableWarning = 0;
static const uint32_t POSITION_UNAVAILABLE_WARNING_INTERVAL_MS = 15000; // 15 seconds
inline void onReceiveProto(char *topic, byte *payload, size_t length)
{
const DecodedServiceEnvelope e(payload, length);
@@ -847,12 +850,14 @@ void MQTT::perhapsReportToMap()
map_position_precision = default_map_position_precision;
}
if (Throttle::isWithinTimespanMs(last_report_to_map, map_publish_interval_msecs))
if (Throttle::isWithinTimespanMs(last_report_to_map, map_publish_interval_msecs) && last_report_to_map != 0)
return;
if (localPosition.latitude_i == 0 && localPosition.longitude_i == 0) {
last_report_to_map = millis();
LOG_WARN("MQTT Map report enabled, but no position available");
if (Throttle::isWithinTimespanMs(lastPositionUnavailableWarning, POSITION_UNAVAILABLE_WARNING_INTERVAL_MS) == false) {
LOG_WARN("MQTT Map report enabled, but no position available");
lastPositionUnavailableWarning = millis();
}
return;
}