Skip to content

Commit 00a8ba2

Browse files
th-theodorouuser2684
authored andcommitted
AnalogReference not updated after a change
1 parent 8e1faa5 commit 00a8ba2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nodemanager/Node.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,8 @@ void NodeManager::setAnalogReference(uint8_t value, uint8_t pin) {
737737
if (value == _analog_reference) return;
738738
// change the analog reference
739739
analogReference(value);
740+
// update _analog_reference
741+
_analog_reference = value;
740742
// wait a bit
741743
wait(200);
742744
// perform some reading before actually reading the value

0 commit comments

Comments
 (0)