Skip to content

Commit f9c66ed

Browse files
authored
Merge pull request #44 from arduino-libraries/portenta_compatibility
Add compatibility to Portenta H7
2 parents ebb94a9 + 4802670 commit f9c66ed

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

examples/MKR/Test/Test.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void setup() {
4646
// This way, you can program the motor to reach a certain position or velocity without any further intervention.
4747
// The PID can be carefully tuned if a particular profile is needed.
4848
pid1.setControlMode(CL_POSITION);
49-
pid1.setGains(25, 0, 3);
49+
pid1.setGains(25.0f, 0.0f, 3.0f);
5050
pid1.setMaxAcceleration(4000);
5151
pid1.setSetpoint(TARGET_POSITION, 5000);
5252
}

src/Common.h

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1515
*/
1616

17+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
18+
#define RESET _RESET
19+
#endif
20+
1721
enum Commands {
1822
GET_VERSION = 0x01,
1923
RESET,

0 commit comments

Comments
 (0)