change button fine ajdustments
This commit is contained in:
42
abzug.c
42
abzug.c
@@ -40,26 +40,6 @@ void do_abzug(){
|
||||
}
|
||||
|
||||
if (read_Input(BTN_ABZUG_PLUS, RISING)) {
|
||||
if(abzug_speed <= 900)
|
||||
abzug_speed += 100;
|
||||
else
|
||||
abzug_speed = 1000;
|
||||
#if PLC_MQTT_ENABLED
|
||||
send_settings();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (read_Input(BTN_ABZUG_MINUS, RISING)) {
|
||||
if(abzug_speed >= 110)
|
||||
abzug_speed -= 100;
|
||||
else
|
||||
abzug_speed = 10;
|
||||
#if PLC_MQTT_ENABLED
|
||||
send_settings();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (read_Input(BTN_ABZUG_PLUS_FEIN, RISING)) {
|
||||
if(abzug_speed <= 990)
|
||||
abzug_speed += 10;
|
||||
else
|
||||
@@ -69,7 +49,7 @@ void do_abzug(){
|
||||
#endif
|
||||
}
|
||||
|
||||
if (read_Input(BTN_ABZUG_MINUS_FEIN, RISING)) {
|
||||
if (read_Input(BTN_ABZUG_MINUS, RISING)) {
|
||||
if(abzug_speed >= 20)
|
||||
abzug_speed -= 10;
|
||||
else
|
||||
@@ -79,6 +59,26 @@ void do_abzug(){
|
||||
#endif
|
||||
}
|
||||
|
||||
if (read_Input(BTN_ABZUG_PLUS_FEIN, RISING)) {
|
||||
if(abzug_speed <= 999)
|
||||
abzug_speed += 1;
|
||||
else
|
||||
abzug_speed = 1000;
|
||||
#if PLC_MQTT_ENABLED
|
||||
send_settings();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (read_Input(BTN_ABZUG_MINUS_FEIN, RISING)) {
|
||||
if(abzug_speed >= 11)
|
||||
abzug_speed -= 1;
|
||||
else
|
||||
abzug_speed = 10;
|
||||
#if PLC_MQTT_ENABLED
|
||||
send_settings();
|
||||
#endif
|
||||
}
|
||||
|
||||
// 16000000/8
|
||||
|
||||
ICR3 = ((1.0/abzug_speed)*3.14*42.0*(1.0/5.0))*2.0*500.0*(1/1.03);
|
||||
|
||||
Reference in New Issue
Block a user