Dependencies: FastPWM GMD_template_lib mbed
Revision 1:29e84d1e7bcc, committed 2016-07-02
- Comitter:
- inst
- Date:
- Sat Jul 02 06:11:50 2016 +0000
- Parent:
- 0:690d8ed9ee20
- Child:
- 2:28499cf0640c
- Commit message:
- template?????duty???????????????
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Jul 01 06:31:56 2016 +0000 +++ b/main.cpp Sat Jul 02 06:11:50 2016 +0000 @@ -20,7 +20,7 @@ int main(){ I2CSlave i2c(dp5, dp27); i2c.address(read_address()); - GMD md(dp1, dp2, dp9); + basic_motor_driver md(dp1, dp2, dp9); while (true){ char buf; @@ -34,7 +34,7 @@ case I2CSlave::WriteAddressed: i2c.read(&buf, 1); - float p = (buf & 0x80) ? -1.0f: 1.0f; + float p = (buf & 0x80) ? -1.0f : 1.0f; p *= (buf & 0x7F); p *= 1.0f / 0x7F;