Skip to content

Commit 2c6d637

Browse files
0.1.0 correct almost open or almost closed values
values < 3 become 0% values >97 become 100%
1 parent 8e8a799 commit 2c6d637

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.c

+2
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@ void parse(int positions) {
343343
aware=0;
344344
if (calibrated) SEND(close); //force a renewed awareness
345345
} else {
346+
if (buff[6]< 3) buff[6]= 0; //the motor retracts a bit when arriving at the goal
347+
if (buff[6]>97) buff[6]=100; //so it (almost) never arrives at exactly 0% or 100%
346348
current.value.int_value=buff[6];
347349
aware=1;
348350
}

0 commit comments

Comments
 (0)