From 31ea5623c5bd33e38c105b1a4240728270f62d71 Mon Sep 17 00:00:00 2001 From: shrkey Date: Sun, 9 Oct 2016 22:24:47 +0100 Subject: [PATCH] debug messages --- darkwater/DW640.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/darkwater/DW640.cpp b/darkwater/DW640.cpp index cf3aeac..9fe31f9 100644 --- a/darkwater/DW640.cpp +++ b/darkwater/DW640.cpp @@ -235,10 +235,13 @@ void DW640::setMotorSpeed(uint8_t motor, uint16_t speed) { } else if( speed > 1500 && speed <= 2000 ) { } else if( speed > 0 && speed <= 255 ) { + printf("fwd %d", speed); runMotor( DW_FORWARD, in1, in2, speed ); } else if( speed < 0 && speed >= -255 ) { + printf("rv %d", speed); runMotor( DW_REVERSE, in1, in2, abs(speed) ); } else if( speed == 0 || speed == 1500 ) { + printf("stp %d", speed); runMotor( DW_STOP, in1, in2, speed ); }