60 bool is_open()
const {
return screen_ !=
nullptr && lv_scr_act() == screen_; }
67 lv_obj_t* screen_ =
nullptr;
68 lv_obj_t* chart_ =
nullptr;
69 lv_chart_series_t* ser_left_ =
nullptr;
70 lv_chart_series_t* ser_right_ =
nullptr;
71 lv_chart_series_t* ser_err_ =
nullptr;
77 bool recording_ =
false;
78 pros::Task* sample_task_ =
nullptr;
79 double chart_y_max_ = 1.0;
80 double chart_y_min_ = -1.0;
83 double last_chart_y_max_ = 0.0;
84 double last_chart_y_min_ = 0.0;
88 void refresh_value_labels();
89 void apply_constants();
92 static void sample_task_fn(
void* param);
93 static void tab_cb(lv_event_t* e);
94 static void inc_cb(lv_event_t* e);
95 static void dec_cb(lv_event_t* e);
96 static void apply_cb(lv_event_t* e);
97 static void back_cb(lv_event_t* e);
98 static void record_cb(lv_event_t* e);
Tank-drive chassis class.
Live PID tuner UI driven by LVGL.
void open()
Render and activate the tuner screen.
void start_task()
Spawn the background sampling task that feeds the chart.
void set_drive(light::Drive *drive)
Bind the Drive whose PIDs this tuner will edit.
void close()
Close the tuner screen and restore the previous LVGL screen.
light::Drive * get_drive() const
Umbrella header for LightLib's own classes.
Public LightLib odometry / pose-estimation API.
PidTuner pid_tuner
Process-wide singleton tuner instance.
PidType
PID controller categories selectable in the tuner.
@ PID_EKF
EKF heading-fusion PID.
@ PID_TURN
Heading/turn-in-place PID.
@ PID_HEADING
Heading correction during drive moves.
@ PID_SWING
Single-side swing PID.
@ PID_DRIVE
Linear drive PID.
ConstSlot
Index into a PidConstants slot.
@ START_I
Integral activation threshold.
Container for one PID's four editable gain values.