Skip to content

pid1.setGains() uses float as input variables [AEK-309] #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ battery.getFiltered()

#### Returns

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

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

```
pid1. setGains(int P, int I, int D)
pid1.setGains(float P, float I, float D)
```

#### Functions

* _setGains(float P, float I, float D)_: Set PID gains. (`int` type for MKRMotorCarrier)
* _setGains(float P, float I, float D)_: Set PID gains.
* _resetGains()_: Reset PID gains to factory default settings.
* _setControlMode(cl_control)_: Set control mode to either `CL_VELOCITY` or `CL_POSITION`.
* _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.
Expand Down