Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/donut_3lb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -38,25 +38,25 @@
#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

// MELTY_MAX_TRANSLATION_AGGRESSION is a number from 0..1 which represents how different
// 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
Expand Down
8 changes: 4 additions & 4 deletions src/donut_accel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)|| ]
Expand Down