Skip to content

Commit 96b0804

Browse files
committed
another way of enabling downsample disable #377
1 parent f796c9d commit 96b0804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/base_classes/FOCMotor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void FOCMotor::useMonitoring(Print &print){
9191
// utility function intended to be used with serial plotter to monitor motor variables
9292
// significantly slowing the execution down!!!!
9393
void FOCMotor::monitor() {
94-
if( monitor_cnt++ < monitor_downsample ) return;
94+
if( !monitor_downsample || monitor_cnt++ < (monitor_downsample-1) ) return;
9595
monitor_cnt = 0;
9696
if(!monitor_port) return;
9797
bool printed = 0;

0 commit comments

Comments
 (0)