Skip to content

Commit 2d83df4

Browse files
authored
pid1.setGains() uses float as input variables [AEK-309] (#38)
* pid.setGains() requires float as input * fix spelling * Obsolete statement for the MKRMotorCarrier
1 parent c160fdc commit 2d83df4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: docs/api.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ battery.getFiltered()
1616

1717
#### Returns
1818

19-
* _getRaw()_: returns the raw ADC read from the battery as am integer.
19+
* _getRaw()_: returns the raw ADC read from the battery as an integer.
2020
* _getConverted()_: returns the battery voltage converted to volts as a floating point.
2121
* _getFiltered()_: returns the battery voltage converted to volts and filtered in the last 10 seconds.
2222

@@ -110,12 +110,12 @@ Allow setting Motor1 or Motor2 to a specific speed or position. There are two PI
110110
#### Syntax
111111

112112
```
113-
pid1. setGains(int P, int I, int D)
113+
pid1.setGains(float P, float I, float D)
114114
```
115115

116116
#### Functions
117117

118-
* _setGains(float P, float I, float D)_: Set PID gains. (`int` type for MKRMotorCarrier)
118+
* _setGains(float P, float I, float D)_: Set PID gains.
119119
* _resetGains()_: Reset PID gains to factory default settings.
120120
* _setControlMode(cl_control)_: Set control mode to either `CL_VELOCITY` or `CL_POSITION`.
121121
* _setSetpoint(cl_mode, int target)_: Set a specific velocity or position in one of the motors. Define cl_mode as `TARGET_POSITION` or `TARGET_VELOCITY` and the desired value in target.

0 commit comments

Comments
 (0)