You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not the greatest at this trig, but i diffed it and found that it ends up decrementing and incrementing on the other while calling these two calculation functions:
void coord_arm2effect(float *x, float *y, float *z){
float anglec;
Wondering why the speed on these two functions are different. set_position has much quicker capabilities. The source for set_polar() shows:
`static enum uarm_protocol_e uarm_cmd_g2201(char *payload){ // <! polar coord
uint8_t rtn = 0;
char s_str[10], r_str[10], h_str[10], f_str[10];
if( rtn = sscanf(payload, "S%[0-9-+.]R%[0-9-+.]H%[0-9-+.]F%[0-9-+.]", s_str, r_str, h_str, f_str) < 4 ){
DB_PRINT_STR( "sscanf %d\r\n", rtn );
return UARM_CMD_ERROR;
}else{
float length = 0, angle = 0, high = 0, speed = 0;
float target[3] = {0};
if( !read_float(s_str, NULL, &length) ){ return false; }
if( !read_float(r_str, NULL, &angle) ){ return false; }
if( !read_float(h_str, NULL, &high) ){ return false; }
if( !read_float(f_str, NULL, &speed) ){ return false; }
}
and source for set_position()
`static enum uarm_protocol_e uarm_cmd_g2204(char *payload){ // <! coord offset
uint8_t rtn = 0;
char x_str[10], y_str[10], z_str[10], f_str[10];
if( rtn = sscanf(payload, "X%[0-9-+.]Y%[0-9-+.]Z%[0-9-+.]F%[0-9-+.]", x_str, y_str, z_str, f_str ) < 4 ){
DB_PRINT_STR( "sscanf %d\r\n", rtn );
return UARM_CMD_ERROR;
}else{
float x = 0, y = 0, z = 0, speed = 0;
float target[3];
if( !read_float(x_str, NULL, &x) ){ return false; }
if( !read_float(y_str, NULL, &y) ){ return false; }
if( !read_float(z_str, NULL, &z) ){ return false; }
if( !read_float(f_str, NULL, &speed) ){ return false; }
}
Not the greatest at this trig, but i diffed it and found that it ends up decrementing and incrementing on the other while calling these two calculation functions:
void coord_arm2effect(float *x, float *y, float *z){
float anglec;
}
void coord_effect2arm(float *x, float *y, float *z){
float anglec;
}
`
Any help making set_polar just as fast as set_position?
The text was updated successfully, but these errors were encountered: