Skip to content

Commit e06ad0e

Browse files
committed
Ensure the ACNode class checks status of the tool before it does anything.
1 parent 92a98ab commit e06ad0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/acnode.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ACNode::ACNode(PN532 &n, RGB &r, Tool &t, int button_pin) :
55
rgb(r),
66
tool(t),
77
menu(r, button_pin),
8-
last_status_checked_at(0),
8+
last_status_checked_at(-30000),
99
enabled(false)
1010
{
1111
}
@@ -104,6 +104,7 @@ bool ACNode::is_enabled() {
104104
last_status_checked_at = millis();
105105
int status = networking::networkCheckToolStatus();
106106
enabled = (status == 1);
107+
acsettings.status = status;
107108
}
108109
return enabled;
109110
}

0 commit comments

Comments
 (0)