Skip to content

Commit 9c33a23

Browse files
committed
FIXS: issue on wheel position reset
1 parent b9ef233 commit 9c33a23

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Arduino_AlvikCarrier
2-
version=1.0.0
2+
version=1.0.1
33
author=Arduino, Giovanni di Dio Bruno, Lucio Rossi
44
maintainer=Arduino <[email protected]>
55
sentence=Library and firmware for Arduino Alvik Carrier board

src/definitions/robot_definitions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const float MOTION_FX_PERIOD = (1000U / MOTION_FX_FREQ);
8888
// Library version
8989
#define VERSION_BYTE_HIGH 1
9090
#define VERSION_BYTE_MID 0
91-
#define VERSION_BYTE_LOW 0
91+
#define VERSION_BYTE_LOW 1
9292

9393

9494

src/motor_control/motor_control.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ bool MotorControl::isPositionControlEnabled(){
217217
}
218218

219219
void MotorControl::resetPosition(const float p0){
220-
position=p0;
220+
disablePositionControl();
221+
pos_pid->reset();
222+
position = p0;
223+
reference_position = p0;
221224
}
222225

223226
float MotorControl::getPosition(){

0 commit comments

Comments
 (0)