Library for MAX14871 Shield, MAXREFDES89#
Dependents: MAXREFDES89_MAX14871_Shield_Demo MAXREFDES89_Test_Program Line_Following_Bot Line_Following_Bot_Pololu
Revision 7:c0bee1397f3e, committed 2016-08-15
- Comitter:
- j3
- Date:
- Mon Aug 15 19:22:31 2016 +0000
- Parent:
- 6:dc06cc75c1c8
- Commit message:
- Added default value of true for default_config in constructor;; Changing operating mode to coast no longer clears duty cycle to 0
Changed in this revision
max14871_shield.cpp | Show annotated file Show diff for this revision Revisions of this file |
max14871_shield.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r dc06cc75c1c8 -r c0bee1397f3e max14871_shield.cpp --- a/max14871_shield.cpp Fri May 13 00:03:32 2016 +0000 +++ b/max14871_shield.cpp Mon Aug 15 19:22:31 2016 +0000 @@ -169,8 +169,6 @@ { port_data |= (MD_EN << 4); } - - set_pwm_duty_cycle(md, 0.0f); break; case BRAKE:
diff -r dc06cc75c1c8 -r c0bee1397f3e max14871_shield.h --- a/max14871_shield.h Fri May 13 00:03:32 2016 +0000 +++ b/max14871_shield.h Mon Aug 15 19:22:31 2016 +0000 @@ -120,7 +120,7 @@ * * @return None **************************************************************/ - Max14871_Shield(I2C *i2c_bus, bool default_config); + Max14871_Shield(I2C *i2c_bus, bool default_config = true); /**********************************************************//** @@ -139,7 +139,7 @@ * * @return None **************************************************************/ - Max14871_Shield(PinName sda, PinName scl, bool default_config); + Max14871_Shield(PinName sda, PinName scl, bool default_config = true); /**********************************************************//** @@ -191,7 +191,7 @@ **************************************************************/ int16_t set_current_regulation_mode(max14871_motor_driver_t md, max14871_current_regulation_mode_t mode, - float vref); + float vref = 1.0); /**********************************************************//**