RT-Thread-packages / rt-robot

a platform in creating new exciting robots
Apache License 2.0
111 stars 62 forks source link

kinematics_get_rpm接口更改的问题 #37

Open yaojinrun opened 4 years ago

yaojinrun commented 4 years ago

原函数rt_int16_t* kinematics_get_rpm(struct kinematics kin, struct velocity target_vel)存在申请内存未释放的问题,但是可以把申请内存的代码移动到kinematics_create函数中去,res_rpm作为全局指针变量即可。而且该内存在转换过程中会重复用到,修改接口的做法我觉得改动太大而不可取。