- Don't think anything was changed or updated.... simply viewed the class
Dependents: Component_Test_Interface
Fork of BridgeDriver by
Diff: BridgeDriver.h
- Revision:
- 10:60c3d513b872
- Parent:
- 9:00e8b7afb2c7
- Child:
- 11:2481432a0988
--- a/BridgeDriver.h Mon Jul 28 21:37:53 2014 +0000 +++ b/BridgeDriver.h Mon Jul 28 21:42:37 2014 +0000 @@ -23,7 +23,7 @@ #define LED_ADDR 0x4E //i2c address of button and LED port expander /** BridgeDriver class - * For controlling the Test Controller bridges + * For controlling the Test Controller bridges. */ class BridgeDriver{ @@ -66,21 +66,21 @@ void enablePwm(uint8_t enPwmA, uint8_t enPwmB, uint8_t enPwmC, uint8_t enPwmD); /** Enables/disables PWM for a given channel pair - * @param motor Motor (channel pair) to enale/disable PWM + * @param motor Motor (channel pair) to enale/disable PWM. * @param enPwm 1 enables PWM on channel pair for motor control, 0 disables PWM on channel pair for solenoid control. */ void enablePwm(Motors motor, uint8_t enPwm); /** Enables/disables braking for channel pairs - * @param enBrakeA 1 drives output to GND when off, 0 floats output when off - * @param enBrakeB 1 drives output to GND when off, 0 floats output when off - * @param enBrakeC 1 drives output to GND when off, 0 floats output when off - * @param enBrakeD 1 drives output to GND when off, 0 floats output when off + * @param enBrakeA 1 drives output to GND when off, 0 floats output when off. + * @param enBrakeB 1 drives output to GND when off, 0 floats output when off. + * @param enBrakeC 1 drives output to GND when off, 0 floats output when off. + * @param enBrakeD 1 drives output to GND when off, 0 floats output when off. */ void enableBraking(uint8_t enBrakeA, uint8_t enBrakeB, uint8_t enBrakeC, uint8_t enBrakeD); /** Enables/disables braking for given channel pair - * @param enBrakeA 1 drives output to GND when off, 0 floats output when off + * @param enBrakeA 1 drives output to GND when off, 0 floats output when off. */ void enableBraking(Motors motor, uint8_t enBrake); @@ -88,8 +88,8 @@ * Will fail if PWM is enabled on given channel. Use forceBrake(Motors motor) to force braking on channels with PWM enabled. * @param ch Channel to drive to GND * @return - * 0 on success - * non 0 on failure + * 0 on success, + * non 0 on failure. */ int forceBrake(uint8_t ch); @@ -97,8 +97,8 @@ * Will fail if PWM is disabled on given channel. Use forceBrake(uint8_t ch) to force braking on channels with PWM disabled. * @param motor Motor (channel pair) to drive to GND * @return - * 0 on success - * non 0 on failure + * 0 on success, + * non 0 on failure. */ int forceBrake(Motors motor); @@ -106,8 +106,8 @@ * Will float both channels of a motor (channel pair) if PWM is enabled for the channel. * @param ch Channel to float. * @return - * 0 on success - * non 0 on failure + * 0 on success, + * non 0 on failure. */ int forceFloat(uint8_t ch); @@ -115,65 +115,65 @@ * Will fail if PWM is disabled on given channel. Use forceFloat(uint8_t ch) to force floating on channels with PWM disabled. * @param motor Motor (channel pair) to float. * @return - * 0 on success - * non 0 on failure + * 0 on success, + * non 0 on failure. */ int forceFloat(Motors motor); /** Set all outputs with a single byte (bitwise control). * Will fail if PWM is enabled for any motor (channel pair). * @param state Sets all the outputs. Each bit controls one channel. - * 1 drives high + * 1 drives high, * 0 brakes (drives to GND) or floats depending on setting of enBrake. * @return - * -1 on failure - * 0 if all outputs are set to 0 - * 1 if any output is set to 1 + * -1 on failure, + * 0 if all outputs are set to 0, + * 1 if any output is set to 1. */ int drive(uint8_t state); /** Set the output of one channel * @param ch Channel to set. * @param on State to set. - * 1 drives high + * 1 drives high, * 0 brakes (drives to GND) or floats depending on setting of enBrake. * @return - * -1 on fauilure - * 0 if set to 0 - * 1 if set to 1 + * -1 on fauilure, + * 0 if set to 0, + * 1 if set to 1. */ int drive(uint8_t ch, uint8_t on); /** Control the speed of a motor * @param motor Motor (channel pair) to control. - * @param speed Speed to set motor to. Acceptable range: -1.0 to 1.0. Speed of 0.0 will coast or brake depending on setting of enBrake + * @param speed Speed to set motor to. Acceptable range: -1.0 to 1.0. Speed of 0.0 will coast or brake depending on setting of enBrake. * @return - * -1 on failure - * speed of set output on success + * -1 on failure, + * speed of set output on success. */ float drive(Motors motor, float speed); /** Control the speed of a motor * @param motor Motor (channel pair) to control. - * @param speed Speed to set motor to. Acceptable range: 0.0 to 1.0. Speed of 0.0 will coast or brake depending on setting of enBrake + * @param speed Speed to set motor to. Acceptable range: 0.0 to 1.0. Speed of 0.0 will coast or brake depending on setting of enBrake. * @param dir Set direction to drive motor. - * 1: forward - * -1: reverse - * 0: brake, irregardless of setting of enBrake or speed + * 1: forward, + * -1: reverse, + * 0: brake, irregardless of setting of enBrake or speed. * @return - * -1 on failure - * speed of set output on success + * -1 on failure, + * speed of set output on success. */ float drive(Motors motor, int8_t dir, float speed); /** Display diagnostic information on the LCD - * @param *lcd Pointer to TextLCD object to display info on + * @param *lcd Pointer to TextLCD object to display info on. */ void diagnostic(TextLCD_I2C *lcd); /** Change the PWM period - * @param newPWMperiod The new PWM period. In seconds. System default is 0.0002 (5kHz) + * @param newPWMperiod The new PWM period. In seconds. System default is 0.0002 (5kHz). */ void setPWMperiod(float newPWMperiod);