Skip to content

Commit ffe388f

Browse files
committed
Change App Config Mahony KP set from Refloat to 0.2
This value is set if high Mahony KP config is detected on startup (this is legacy config and needs to be changed in the IMU setup wizard on VESC Tool side). Feature: Set App Config IMU Mahony KP to 0.2 if high Mahony KP config is detected > This is set on Refloat startup and serves to reset the App Config (not Refloat Config) to regular Mahony values after doing the IMU Setup wizard. Previously, value of 0.4 was used, but 0.2 is deemed the better default (it only affects the Booster and the tilt checks, like roll/pitch faults, the quickstop angle, etc.).
1 parent a5c48b2 commit ffe388f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎src/main.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,8 @@ static void configure(Data *d) {
207207
// the old setup with it being the main balancing filter. In that case, set
208208
// the kp and acc confidence decay to hardcoded defaults of the former true
209209
// pitch filter, to preserve the behavior of the old setup in the new one.
210-
// (Though Mahony KP 0.4 instead of 0.2 is used, as it seems to work better)
211210
if (VESC_IF->get_cfg_float(CFG_PARAM_IMU_mahony_kp) > 1) {
212-
VESC_IF->set_cfg_float(CFG_PARAM_IMU_mahony_kp, 0.4);
211+
VESC_IF->set_cfg_float(CFG_PARAM_IMU_mahony_kp, 0.2);
213212
VESC_IF->set_cfg_float(CFG_PARAM_IMU_mahony_ki, 0);
214213
VESC_IF->set_cfg_float(CFG_PARAM_IMU_accel_confidence_decay, 0.1);
215214
}

0 commit comments

Comments
 (0)