1- component translate """Translate from Joint to Axis""";
1+ component joint_axis_mapper """Translate from Joint to Axis""";
22
33license "GPL";
44
@@ -28,15 +28,15 @@ char fault_letter[16];
2828
2929int rtapi_app_main(void) {
3030 int r = 0;
31- comp_id = hal_init("translate ");
31+ comp_id = hal_init("joint_axis_mapper ");
3232 char buf[HAL_NAME_LEN + 1];
3333
3434 if(comp_id < 0) return comp_id;
3535
3636 number_joints = strlen(coord);
3737 faults_in = hal_malloc(sizeof(faults_in_t));
3838
39- rtapi_print_msg(RTAPI_MSG_INFO, "Translate - Initializing with coords %s\n", coord);
39+ rtapi_print_msg(RTAPI_MSG_INFO, "Joint Axis Mapper - Initializing with coords %s\n", coord);
4040
4141 int this_count = 0;
4242 for(int i =0; i < strlen(coord); i++){
@@ -65,19 +65,19 @@ int rtapi_app_main(void) {
6565 if(coord[i] == 'W' || coord[i] == 'w'){ axis_counts[8]++; this_count = axis_counts[8]; }
6666
6767 if(this_count == 1){
68- hal_pin_bit_newf(HAL_IN, &(faults_in->fault_in[i]), comp_id, "translate .%c-fault", coord[i]);
69- hal_pin_bit_newf(HAL_OUT, &(faults_in->fault_out[i]), comp_id, "translate .%c-fault-latched", coord[i]);
68+ hal_pin_bit_newf(HAL_IN, &(faults_in->fault_in[i]), comp_id, "jam .%c-fault", coord[i]);
69+ hal_pin_bit_newf(HAL_OUT, &(faults_in->fault_out[i]), comp_id, "jam .%c-fault-latched", coord[i]);
7070 }
7171 else if(this_count > 1){
72- hal_pin_bit_newf(HAL_IN, &(faults_in->fault_in[i]), comp_id, "translate .%c%d-fault", coord[i], this_count);
73- hal_pin_bit_newf(HAL_OUT, &(faults_in->fault_out[i]), comp_id, "translate .%c%d-fault-latched", coord[i], this_count);
72+ hal_pin_bit_newf(HAL_IN, &(faults_in->fault_in[i]), comp_id, "jam .%c%d-fault", coord[i], this_count);
73+ hal_pin_bit_newf(HAL_OUT, &(faults_in->fault_out[i]), comp_id, "jam .%c%d-fault-latched", coord[i], this_count);
7474 }
7575 else {
76- rtapi_print_msg(RTAPI_MSG_ERR, "Translate - %c Axis not found in coord string\n", coord[i]);
76+ rtapi_print_msg(RTAPI_MSG_ERR, "Joint Axis Mapper - %c axis not found in coord string\n", coord[i]);
7777 }
7878 }
7979
80- hal_export_funct("translate ", (void(*))_, 0, 1, 0, comp_id);
80+ hal_export_funct("joint_axis_mapper ", (void(*))_, 0, 1, 0, comp_id);
8181 hal_ready(comp_id);
8282 return 0;
8383}
@@ -90,7 +90,7 @@ void rtapi_app_exit(void) {
9090FUNCTION(_) {
9191 for(int i = 0; i < number_joints; i++) {
9292 if(*faults_in->fault_in[i] && ! *faults_in->fault_out[i]){
93- rtapi_print_msg(RTAPI_MSG_ERR, "Translate - %c Axis fault detected\n", fault_letter[i]);
93+ rtapi_print_msg(RTAPI_MSG_ERR, "%c Axis fault detected\n", fault_letter[i]);
9494 }
9595 *(faults_in->fault_out[i]) = *(faults_in->fault_in[i]);
9696 }
0 commit comments