2017 hongo b alpha
Revision 1:402a36cb88ce, committed 2017-09-25
- Comitter:
- Komazawa_sun
- Date:
- Mon Sep 25 00:14:24 2017 +0000
- Parent:
- 0:3e9f5fcfc775
- Commit message:
- fix;
Changed in this revision
ShooterAngle.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ShooterAngle.cpp Fri Sep 22 04:31:23 2017 +0000 +++ b/ShooterAngle.cpp Mon Sep 25 00:14:24 2017 +0000 @@ -10,10 +10,13 @@ void ShooterAngle::setAngle(unsigned int angle) { + uint8_t send_data = 0; if(_angle_max < angle) - to_slave.write((uint8_t)_angle_max); - if(_angle_min > angle) - to_slave.write((uint8_t)_angle_min); + send_data = (uint8_t)_angle_max; + else if(_angle_min > angle) + send_data = (uint8_t)_angle_min; else - to_slave.write((uint8_t)angle); + send_data = (uint8_t)angle; + printf("%d\r\n",send_data); + to_slave.write(send_data); } \ No newline at end of file