Skip to content

Commit 52d00f3

Browse files
author
Guillaume
committed
Add option CM_BLINK_DONT_MESS_WITH_ME
If you prefer to manage blinkup out of the ConnectionManager
1 parent dafcecd commit 52d00f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: ConnectionManager.lib.nut

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const CM_BLINK_ALWAYS = 0;
2626
const CM_BLINK_NEVER = 1;
2727
const CM_BLINK_ON_CONNECT = 2;
2828
const CM_BLINK_ON_DISCONNECT = 3;
29+
const CM_BLINK_DONT_MESS_WITH_ME = 4;
2930
const CM_FLUSH_TIMEOUT = 30;
3031
const CM_START_NO_ACTION = 0;
3132
const CM_START_CONNECTED = 1;
@@ -457,6 +458,11 @@ class ConnectionManager {
457458

458459
// Enables of disables BlinkUp based on _blinkupBehavior and _connected
459460
function _setBlinkUpState() {
461+
// If you prefer to manage blinkup out of the ConnectionManager
462+
if (_blinkupBehavior == CM_BLINK_DONT_MESS_WITH_ME) {
463+
return;
464+
}
465+
460466
// If it's set to always blinkup
461467
if (_blinkupBehavior == CM_BLINK_ALWAYS) {
462468
imp.enableblinkup(true);

0 commit comments

Comments
 (0)