Skip to content

Commit

Permalink
disable arm_translate (physically unplugged)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickxu2 committed Nov 10, 2024
1 parent bfaf532 commit e32944d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions vehicles/Engineer/chassis/include/arm_translate_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ void kill_arm_translate();
void revive_arm_translate();


/* M3508 params start */
const int BASE_TRANSLATE_ID = 0x205;
/* M3508 params start */
const int BASE_TRANSLATE_ID = 0x209; // TODO: need to reconnect
//const GPIO_TypeDef* BASE_TRANS_INIT_GPIO_PORT = GPIOI;
//const uint16_t BASE_TRANS_INIT_GPIO_PIN = GPIO_PIN_7; // PWM pin 1 on C board

Expand Down
12 changes: 5 additions & 7 deletions vehicles/Engineer/chassis/src/chassis_task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void chassisTask(void* arg){
UNUSED(arg);

control::MotorCANBase* wheel_motors[] = {motor5, motor6, motor7, motor8};
control::MotorCANBase* steer_motors[] = {motor2, motor3, motor4};
control::MotorCANBase* steer_motors[] = {motor2, motor3, motor4, motor1};
chassis->SteerSetMaxSpeed(ALIGN_SPEED);
chassis->Calibrate();

Expand Down Expand Up @@ -165,8 +165,7 @@ void chassisTask(void* arg){
50);


control::MotorCANBase::TransmitOutput(steer_motors, 3);
control::MotorCANBase::TransmitOutput(&motor1, 1);
control::MotorCANBase::TransmitOutput(steer_motors, 4);
control::MotorCANBase::TransmitOutput(wheel_motors, 4);

// if(HAL_GetTick() - last_cap_send > 10){ // 100Hz
Expand Down Expand Up @@ -194,7 +193,7 @@ void chassisTask(void* arg){

void init_chassis(){
print("Starting chassis init\n");
motor1 = new control::Motor6020(can1, 0x209);
motor1 = new control::Motor6020(can1, 0x205);
motor2 = new control::Motor6020(can1, 0x206);
motor3 = new control::Motor6020(can1, 0x207);
motor4 = new control::Motor6020(can1, 0x208);
Expand Down Expand Up @@ -258,7 +257,7 @@ void kill_chassis(){
RM_EXPECT_TRUE(false, "Operation Killed!\r\n");

control::MotorCANBase* wheel_motors[] = {motor5, motor6, motor7, motor8};
control::MotorCANBase* steer_motors[] = {motor2, motor3, motor4};
control::MotorCANBase* steer_motors[] = {motor2, motor3, motor4, motor1};

// RGB->Display(display::color_blue);
// set alignment status of each wheel to false
Expand All @@ -267,8 +266,7 @@ void kill_chassis(){
motor7->SetOutput(0);
motor8->SetOutput(0);
control::MotorCANBase::TransmitOutput(wheel_motors, 4);
control::MotorCANBase::TransmitOutput(&motor1, 1); // id 0x209 has a different identifier
control::MotorCANBase::TransmitOutput(steer_motors, 3);
control::MotorCANBase::TransmitOutput(steer_motors, 4);
}

void revive_chassis(){
Expand Down

0 comments on commit e32944d

Please sign in to comment.