2017 hongo b alpha
Diff: ShooterAngle.cpp
- Revision:
- 1:402a36cb88ce
- Parent:
- 0:3e9f5fcfc775
--- 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