Skip to content

Commit

Permalink
modify flash configs and adjust pa_hero's feedback for pid params
Browse files Browse the repository at this point in the history
  • Loading branch information
tz61 committed Mar 13, 2024
1 parent a9a7db1 commit ddbe417
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 47 deletions.
22 changes: 0 additions & 22 deletions config/RM_Board_Linux.cfg

This file was deleted.

22 changes: 0 additions & 22 deletions config/RM_Board_Mac.cfg

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions config/openocd_flash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ cd "$config_base"
exit_cmd="exit"
# default flash file: hero
flash_file="../build/HERO.elf"
# default flash config file: RM_Board_Win.cfg
config_file="RM_Board_Win.cfg"
# default flash config file: RM_F4_Stlink.cfg
config_file="RM_F4_Stlink.cfg"



Expand Down
3 changes: 2 additions & 1 deletion dev/application/param_adjusts/pa_hero/pa_hero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,14 @@ DEF_SHELL_CMD_START(cmd_echo_param)

unsigned pid_id = Shell::atoi(argv[1]);
if (pid_id > 1) {
// TODO, pid_id=2 for autostraightening
Shell::printf("Invalid pid ID %d" SHELL_NEWLINE_STR, pid_id);
return false;
}

PIDController::pid_params_t pid_param = {0,0,0,0,0};
pid_param = CANMotorController::getPIDParams((CANMotorCFG::motor_id_t)motor_id, (pid_id == 0));
Shell::printf("kp: %.2f, ki: %.2f, kd: %.2f, i_limit: %.2f, out_limit: %.2f" SHELL_NEWLINE_STR,
Shell::printf("!kp:%u,%.2f,ki:%.2f,kd:%.2f,il:%.2f,ol:%.2f" SHELL_NEWLINE_STR,pid_id,
pid_param.kp, pid_param.ki, pid_param.kd, pid_param.i_limit, pid_param.out_limit);
return true; // command executed successfully
DEF_SHELL_CMD_END
Expand Down

0 comments on commit ddbe417

Please sign in to comment.