From 2c6d637118279da1c23974eda00c91b3fef34ace Mon Sep 17 00:00:00 2001 From: HomeACcessoryKid Date: Tue, 4 Dec 2018 18:43:03 +0100 Subject: [PATCH] 0.1.0 correct almost open or almost closed values values < 3 become 0% values >97 become 100% --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index de22f3a..52897f0 100644 --- a/main.c +++ b/main.c @@ -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; }