optimize filter values from test ride

This commit is contained in:
interfisch 2022-05-22 18:47:03 +02:00
parent 1b8b036e66
commit df5133191d
1 changed files with 7 additions and 7 deletions

View File

@ -63,8 +63,8 @@ long last_adcupdated=0;
#define CONTROLUPDATEPERIOD 10
long last_controlupdate = 0;
float filter_nrf_set_speed=0.1; //higher value, faster response. depends on CONTROLUPDATEPERIOD
float filter_nrf_set_steer=0.1;
float filter_nrf_set_speed=0.02; //higher value, faster response. depends on CONTROLUPDATEPERIOD
float filter_nrf_set_steer=0.06;
#define GT_LENGTH_MIN 200 //minimum length for stuff to start happen
@ -120,7 +120,7 @@ uint16_t gt_length_set=1000; //set length to keep [mm]
float gt_speed_p=0.7; //value to multipy difference [mm] with -> out_speed
float gt_speedbackward_p=0.7;
float gt_steer_p=2.0;
int16_t gt_speed_limit=400; //maximum out_speed value +
int16_t gt_speed_limit=500; //maximum out_speed value +
int16_t gt_backward_speed_limit=100; //maximum out_speed value (for backward driving) -
int16_t gt_steer_limit=300; //maximum out_steer value +-
#define GT_LENGTH_MAXIMUMDIFFBACKWARD -250 //[mm]. if gt_length_set=1000 and GT_LENGTH_MAXIMUMDIFFBACKWARD=-200 then only drives backward if lenght is greater 800
@ -564,11 +564,11 @@ void updateInputs(unsigned long loopmillis) {
break;
case 1: //Filter NRF Speed
if (button_inc_click) {
filter_nrf_set_speed+=0.01;
filter_nrf_set_speed+=0.005;
filter_nrf_set_speed = constrain(filter_nrf_set_speed, 0.01, 1.0);
}
if (button_dec_click) {
filter_nrf_set_speed-=0.01;
filter_nrf_set_speed-=0.005;
filter_nrf_set_speed = constrain(filter_nrf_set_speed, 0.01, 1.0);
}
break;
@ -750,10 +750,10 @@ void display_show_menu() {
display.print(F("EXIT")); display.println();
break;
case 1:
display.print(F("Fltr spd=")); display.println(filter_nrf_set_speed);
display.print(F("Fltr spd=")); display.println(filter_nrf_set_speed,3);
break;
case 2:
display.print(F("Fltr str=")); display.println(filter_nrf_set_steer);
display.print(F("Fltr str=")); display.println(filter_nrf_set_steer,3);
break;
case 3:
display.print(F("gt_speed_p=")); display.println(gt_speed_p);