projects
/
challenge-bot
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
clarify lack of checking speed lower bound
[challenge-bot]
/
build-stages
/
h_stay_on_table
/
h_stay_on_table.ino
diff --git
a/build-stages/h_stay_on_table/h_stay_on_table.ino
b/build-stages/h_stay_on_table/h_stay_on_table.ino
index 58b55ab7aa2a71717df68642c655b015eac10055..48d0802d8c92643054b13e0977916078487ca58c 100644
(file)
--- a/
build-stages/h_stay_on_table/h_stay_on_table.ino
+++ b/
build-stages/h_stay_on_table/h_stay_on_table.ino
@@
-48,6
+48,7
@@
void set_motor(int speed_pin,
else{ // speed is 0
off(forward_pin);
off(backward_pin);}
+ // since speed has been set positive, no need to check if speed < -255.
if(speed > 255){
speed = 255;}
analogWrite(speed_pin, speed);}