Skip to content

Commit add4101

Browse files
author
Brian Baltz
committed
ATLEDGE-516 Stop callback when setting duty cycle to 0
Signed-off-by: Brian Baltz <[email protected]>
1 parent ef62ce6 commit add4101

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libraries/CurieTimerOne/CurieTimer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ int CurieTimer::pwmStart(unsigned int outputPin, double dutyPercentage, unsigned
163163
pinMode(pwmPin, OUTPUT);
164164

165165
if(dutyPercentage == 0.0) {
166+
kill();
166167
digitalWrite(pwmPin, LOW);
167168
return SUCCESS;
168169
}

0 commit comments

Comments
 (0)