Skip to content

Commit e935fe7

Browse files
Merge pull request #532 from jaguilar/fix_feedforward_init
Fix feedforward voltage initialization.
2 parents 9723e39 + 7ae4248 commit e935fe7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/common/base_classes/FOCMotor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ class FOCMotor
220220
float voltage_bemf; //!< estimated backemf voltage (if provided KV constant)
221221
float Ualpha, Ubeta; //!< Phase voltages U alpha and U beta used for inverse Park and Clarke transform
222222

223-
DQCurrent_s feed_forward_current;//!< current d and q current measured
224-
DQVoltage_s feed_forward_voltage;//!< current d and q voltage set to the motor
223+
DQCurrent_s feed_forward_current = {0.0f, 0.0f};//!< current d and q current measured
224+
DQVoltage_s feed_forward_voltage = {0.0f, 0.0f};//!< current d and q voltage set to the motor
225225

226226
// motor configuration parameters
227227
float voltage_sensor_align;//!< sensor and motor align voltage parameter

0 commit comments

Comments
 (0)