Skip to content

Commit 9c642f8

Browse files
committed
fixing erroneous delay in set DAC value transaction
1 parent 2ba6acb commit 9c642f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/AnalogExpansion.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,9 @@ void AnalogExpansion::setDac(uint8_t ch, uint16_t value,
694694
uint8_t t = 0;
695695
do {
696696
err = execute(SET_SINGLE_ANALOG_OUTPUT);
697-
delay(5);
697+
if(err) {
698+
delay(5);
699+
}
698700
t++;
699701
} while(err != EXECUTE_OK && t < 3);
700702

0 commit comments

Comments
 (0)