File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -108,15 +108,19 @@ void FOCMotor::monitor() {
108
108
DQCurrent_s c{0 ,0 };
109
109
if (current_sense){
110
110
if (torque_controller == TorqueControlType::foc_current) c = current;
111
- else c = current_sense->getFOCCurrents (electrical_angle);
111
+ else {
112
+ c = current_sense->getFOCCurrents (electrical_angle);
113
+ c.q = LPF_current_q (c.q );
114
+ c.d = LPF_current_d (c.d );
115
+ }
112
116
}
113
117
if (monitor_variables & _MON_CURR_Q) {
114
- monitor_port->print (c.q *1000 ,2 ); // mAmps
118
+ monitor_port->print (c.q *1000 , 2 ); // mAmps
115
119
monitor_port->print (" \t " );
116
120
printed= true ;
117
121
}
118
122
if (monitor_variables & _MON_CURR_D) {
119
- monitor_port->print (c.d *1000 ,2 ); // mAmps
123
+ monitor_port->print (c.d *1000 , 2 ); // mAmps
120
124
monitor_port->print (" \t " );
121
125
printed= true ;
122
126
}
You can’t perform that action at this time.
0 commit comments