Skip to content

Commit

Permalink
change driving direction and correct printing float
Browse files Browse the repository at this point in the history
  • Loading branch information
rickxu2 committed Oct 5, 2024
1 parent 9712c0c commit 831e4ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions vehicles/Engineer/arm/src/arm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ void checkEncodersConnected(){
if (!encoder1->is_connected()){
print("encoder 1 not connected\r\n");
}
print("encoder 0: %d encoder 1: %d\r\n", encoder0->getData(), encoder1->getData());
print("encoder 0: %f encoder 1: %f\r\n", encoder0->getData(), encoder1->getData());
osDelay(100);
}
}
Expand Down Expand Up @@ -400,12 +400,12 @@ void armTask(void* args) {

// uncomment SetZeroPos() if remounted 4310

forearm_rotate_motor_4->SetZeroPos();
osDelay(10);
wrist_rotate_motor_5->SetZeroPos();
osDelay(10);
hand_rotate_motor_6->SetZeroPos();
osDelay(10);
// forearm_rotate_motor_4->SetZeroPos();
// osDelay(10);
// wrist_rotate_motor_5->SetZeroPos();
// osDelay(10);
// hand_rotate_motor_6->SetZeroPos();
// osDelay(10);



Expand Down
4 changes: 2 additions & 2 deletions vehicles/Engineer/arm/src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ void RM_RTOS_Default_Task(const void* args) {
// print("ROBOTID: %d",referee->game_robot_status.robot_id);
#endif
send->cmd.id = bsp::VX;
send->cmd.data_float = -sbus->ch[6]/660.0;
send->cmd.data_float = sbus->ch[6]/660.0;
send->TransmitOutput();
send->cmd.id = bsp::VY;
send->cmd.data_float = -sbus->ch[7]/660.0;
send->cmd.data_float = sbus->ch[7]/660.0;
send->TransmitOutput();
send->cmd.id = bsp::RELATIVE_ANGLE;
send->cmd.data_float = -sbus->ch[8]/660.0;
Expand Down

0 comments on commit 831e4ab

Please sign in to comment.