查看Wowwee Rovio 核心库 libNS 逆向工程的源代码
←
Wowwee Rovio 核心库 libNS 逆向工程
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== mcu_send_cmd(p1, p2, p3, p4) == <pre> char mcu_cmd[] = { 0x55, 0x11, 0x4d, 0x4d, 0x00, 0x01, 0x00, 0x53, 0x48, 0x52, 0x54, 0x00, 0x01, 0x00, 0x01, p1, p2, p3, p4, 0x00, 0x00, 0xaa } 调用 mcuSendCommand() 或 mcuSendCommand_NoResponse() 将命令字通过写 mcu 的串口“通知”mcu 执行相应的动作 这两个函数定义在 Host/LibCamera/Src/MCU.c </pre> == send_drive_cmd(p1, p2) == <pre> mcu_send_cmd(p1, p2, 0, 0); </pre> === state_change_head_position(p1) === <pre> send_drive_cmd(0xc, p1) </pre> 参数 p1 取值: 0x00 head 放平 0xff head 抬到最高 <br><br> == send_wheel_cmd(p1, p2, p3, p4) == <pre> if(p2 <= 0) t2 = ((-p2) & 0xff) | 0x80; else t2 = p2 & 0xff; if(p3 <= 0) t3 = ((-p3) & 0xff) | 0x80; else t3 = p3 & 0xff; if(p4 <= 0) t4 = ((-p4) & 0xff) | 0x80; else t4 = p4 & 0xff; mcu_send_cmd(p1, t2, t3, t4); </pre> === send_wheel_speed_cmd(p1, p2, p3) === send_wheel_cmd(0x1b, p1, p2, p3); === send_wheel_pwm_cmd(p1, p2, p3) === send_wheel_cmd(0x17, p1, p2, p3); == update_encoders() == == smc_go_home() == <br><br><br> <br><br><br> <br><br><br> <br><br><br> <br><br><br> <br><br><br> <br><br><br> <br><br><br> <br><br><br> <br><br><br> <br><br><br>
返回到
Wowwee Rovio 核心库 libNS 逆向工程
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面