Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:0b0b7e0b6712, committed 2011-11-14
- Comitter:
- Nurbol
- Date:
- Mon Nov 14 15:13:57 2011 +0000
- Parent:
- 0:2b10383306a2
- Commit message:
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Nov 10 11:47:25 2011 +0000 +++ b/main.cpp Mon Nov 14 15:13:57 2011 +0000 @@ -121,7 +121,13 @@ command->result_status = CMD_BAD_SERVO_VALUE; break; } - pulse_width = 1000 + (command->param[1] * 1000) / MAX_SERVO_ANGLE; // convert angle to pulse width + if ((command->param[0] == 4) && (command->param[1] == 0)) { + pulse_width = 0; // convert angle to pulse width + } + else{ + pulse_width = 1000 + (command->param[1] * 1000) / MAX_SERVO_ANGLE; // convert angle to pulse width + } + // // implement servo move to all 5 servos // @@ -141,7 +147,8 @@ // case READ_CMD : command->nos_data = 1; // no data to be returned - command->result_data[0] = last_servo; + command->result_data[0] = valueLED1; + command->result_data[1] = valueLED2; break; // // catch any problems