Skip to content

Commit

Permalink
0.1.0 correct almost open or almost closed values
Browse files Browse the repository at this point in the history
values <  3 become 0%
values >97 become 100%
  • Loading branch information
HomeACcessoryKid committed Dec 4, 2018
1 parent 8e8a799 commit 2c6d637
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ void parse(int positions) {
aware=0;
if (calibrated) SEND(close); //force a renewed awareness
} else {
if (buff[6]< 3) buff[6]= 0; //the motor retracts a bit when arriving at the goal
if (buff[6]>97) buff[6]=100; //so it (almost) never arrives at exactly 0% or 100%
current.value.int_value=buff[6];
aware=1;
}
Expand Down

0 comments on commit 2c6d637

Please sign in to comment.