mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-30 22:50:57 +00:00
Space out periodic broadcasts of modules automatically (#5931)
* Space out periodic broadcasts of modules automatically * Add warning for function usage --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -81,7 +81,7 @@ int32_t DetectionSensorModule::runOnce()
|
||||
}
|
||||
LOG_INFO("Detection Sensor Module: init");
|
||||
|
||||
return DELAYED_INTERVAL;
|
||||
return setStartDelay();
|
||||
}
|
||||
|
||||
// LOG_DEBUG("Detection Sensor Module: Current pin state: %i", digitalRead(moduleConfig.detection_sensor.monitor_pin));
|
||||
@@ -161,4 +161,4 @@ bool DetectionSensorModule::hasDetectionEvent()
|
||||
bool currentState = digitalRead(moduleConfig.detection_sensor.monitor_pin);
|
||||
// LOG_DEBUG("Detection Sensor Module: Current state: %i", currentState);
|
||||
return (moduleConfig.detection_sensor.detection_trigger_type & 1) ? currentState : !currentState;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user