improved encoder behavior
This commit is contained in:
parent
e3b308aad7
commit
8443725f70
6
stir.ino
6
stir.ino
@ -7,7 +7,7 @@
|
|||||||
#define SX Serial.print
|
#define SX Serial.print
|
||||||
#define SXN Serial.println
|
#define SXN Serial.println
|
||||||
|
|
||||||
String VERSION = "1.7.1";
|
String VERSION = "1.7.2";
|
||||||
|
|
||||||
int SPEEDINC = 50; // speed increment (rpm)
|
int SPEEDINC = 50; // speed increment (rpm)
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ void loop() { //////////////////////////////////////////////////////////////////
|
|||||||
bdelay=0; //////////////////////////////////////////////////////////////////////////////////// process switch
|
bdelay=0; //////////////////////////////////////////////////////////////////////////////////// process switch
|
||||||
if (!bprocess) {
|
if (!bprocess) {
|
||||||
while (!digitalRead(SW)){
|
while (!digitalRead(SW)){
|
||||||
bdelay++;delay(25);bprocess=1;if (bdelay>20) break;
|
bdelay++;delay(15);bprocess=1;if (bdelay>20) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ void loop() { //////////////////////////////////////////////////////////////////
|
|||||||
|
|
||||||
if (M==2) S=cut(S,0,8); // check menu mode
|
if (M==2) S=cut(S,0,8); // check menu mode
|
||||||
|
|
||||||
SAVE++;updatelcd();delay(50);
|
SAVE++;updatelcd();delay(25);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
enclast=encval;
|
enclast=encval;
|
||||||
|
8
stirctl
8
stirctl
@ -18,7 +18,7 @@ $cmd=join(':',@ARGV);$cmd='info' if ($cmd=~/^\s*$/);
|
|||||||
|
|
||||||
@r=split(':',&scmd($cmd));
|
@r=split(':',&scmd($cmd));
|
||||||
|
|
||||||
print " Left Right\n";
|
print " LEFT RIGHT\n";
|
||||||
printf("Stirrer On: %6d %6d\n", $r[0],$r[16]);
|
printf("Stirrer On: %6d %6d\n", $r[0],$r[16]);
|
||||||
printf("Speed: %6d %6d\n", $r[1],$r[17]);
|
printf("Speed: %6d %6d\n", $r[1],$r[17]);
|
||||||
printf("Boost Speed: %6d %6d\n", $r[2],$r[18]);
|
printf("Boost Speed: %6d %6d\n", $r[2],$r[18]);
|
||||||
@ -36,9 +36,9 @@ printf("Random Value: %6d %6d\n", $r[13],$r[29]);
|
|||||||
printf("Boost Remain: %6d %6d\n", $r[14],$r[30]);
|
printf("Boost Remain: %6d %6d\n", $r[14],$r[30]);
|
||||||
printf("Off Remain: %6d %6d\n", $r[15],$r[31]);
|
printf("Off Remain: %6d %6d\n", $r[15],$r[31]);
|
||||||
|
|
||||||
printf("Version: %s\n",$r[32]);
|
printf("VERSION: %s\n",$r[32]);
|
||||||
printf("Uptime: %s\n",&dhms($r[33]/1000));
|
printf("UPTIME: %s\n",&dhms($r[33]/1000));
|
||||||
printf("Error: %d\n",$r[34]);
|
printf("ERROR: %d\n",$r[34]);
|
||||||
|
|
||||||
sub scmd() { ##################################################################################### send command
|
sub scmd() { ##################################################################################### send command
|
||||||
my($cmd,$quiet)=@_;
|
my($cmd,$quiet)=@_;
|
||||||
|
Loading…
Reference in New Issue
Block a user