From f41345e2cbf3a458148e9f8a679d5f83dfe7a59b Mon Sep 17 00:00:00 2001 From: Tedster59 Date: Wed, 17 Jun 2026 20:29:27 -0400 Subject: [PATCH 1/2] Fix 1 more missed config def swap --- src/donut_meltier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/donut_meltier.c b/src/donut_meltier.c index 03aa7ae..4c81f21 100644 --- a/src/donut_meltier.c +++ b/src/donut_meltier.c @@ -146,7 +146,7 @@ void when_failsafe_off() { #ifdef LIE_ABOUT_RPM get_fake_rpm #else - #ifdef USE_3LB_ACCEL_SETUP + #ifdef DONUT_3LB_CONFIG get_rpm_2accel #else get_rpm From 8940b99c040bd884d89950396c39b53dae3feb55 Mon Sep 17 00:00:00 2001 From: Tedster59 Date: Wed, 17 Jun 2026 20:29:54 -0400 Subject: [PATCH 2/2] latest 3lb settings --- src/donut_3lb_config.h | 10 +++++----- src/donut_accel.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/donut_3lb_config.h b/src/donut_3lb_config.h index 97b45b0..e4f072b 100644 --- a/src/donut_3lb_config.h +++ b/src/donut_3lb_config.h @@ -29,7 +29,7 @@ #define ACCEL_MOUNT_RADIUS_CM 0 // this being 0 prevents accel_offset from going negative in 3lb mode // this value will need to be tuned to a good speed - Cai -#define HEADING_CONTROL_SENSITIVITY 0.01 // tunes how fast the heading led moves left or right +#define HEADING_CONTROL_SENSITIVITY 0.05 // tunes how fast the heading led moves left or right #define ACCEL_1_X_OFFSET -7 #define ACCEL_1_Y_OFFSET -5 @@ -38,17 +38,17 @@ #define ACCEL_2_Y_OFFSET -5 -#define THROTTLE_PC_P 1 // was 0.5 for working translation test with 1lb on 4/29/26 - Cai +#define THROTTLE_PC_P 1.5 // was 0.5 for working translation test with 1lb on 4/29/26 - Cai // CAN_ADJUST_ACCEL_MOUNT_RADIUS is defined here so you can use the // left_stick_x to adjust the get_rpm_2accel RPM reading by a constant factor #define CAN_ADJUST_ACCEL_MOUNT_RADIUS -#define ACCEL_OFFSET_SENSITIVITY 0.0001 +#define ACCEL_OFFSET_SENSITIVITY 0.005 #define MOTOR_ON_PERCENT_DURATION 0.5 // This might technically be a half of a half - Cai (I still have no idea what this comment means - also Cai) #define MIN_TRANSLATION_RPM 400 -#define LED_OFFSET_PERCENT 0.25 +#define LED_OFFSET_PERCENT 0.5 #define MIN_LED_PERCENT_DURATION 0.25 #define MAX_LED_PERCENT_DURATION 0.5 @@ -56,7 +56,7 @@ // the throttle sent to each motor can be during a half-rotation // 1 = very different // 0 = can't differ at all -#define MELTY_MAX_TRANSLATION_AGGRESSION 0.75 +#define MELTY_MAX_TRANSLATION_AGGRESSION 0.65 #define MELTY_MAX_THROTTLE 1 #define TANK_DRIVE_MAX_THROTTLE 0.125 diff --git a/src/donut_accel.c b/src/donut_accel.c index 2f3073c..1f4ea22 100644 --- a/src/donut_accel.c +++ b/src/donut_accel.c @@ -110,11 +110,11 @@ double get_rpm_2accel(double right_x_percent, double accel_offset_cm) { // Position vectors of the accelerometers (in cm) - Accel1Position.x = 1.0 * 1.0/sqrtf(2.0); - Accel1Position.y = 1.0 * 1.0/sqrtf(2.0); + Accel1Position.x = 1.025 * 1.0/sqrtf(2.0); + Accel1Position.y = 1.025 * 1.0/sqrtf(2.0); - Accel2Position.x = -1.0 * 1.0/sqrtf(2.0); - Accel2Position.y = -1.0 * 1.0/sqrtf(2.0); + Accel2Position.x = -1.025 * 1.0/sqrtf(2.0); + Accel2Position.y = -1.025 * 1.0/sqrtf(2.0); // omega = sqrt [ ||(a1 - a2)|| / ||(r2 - r1)|| ]