full test

This commit is contained in:
shrkey
2016-10-10 20:14:05 +01:00
parent 8c1fc5e9ec
commit f7a3f9ff82

View File

@@ -232,8 +232,10 @@ void DW640::setMotorSpeed(uint8_t motor, int16_t speed) {
} }
// Speed deciphering for the two control modes // Speed deciphering for the two control modes
if( speed >= 1000 && speed < 1500 ) { if( speed >= 1000 && speed < 1500 ) {
runMotor( DW_REVERSE, in1, in2, map(speed, 1500, 1000, 0, 255 ) );
printf( "%d - %d\n", speed, map(speed, 1500, 1000, 0, 255 ) ); printf( "%d - %d\n", speed, map(speed, 1500, 1000, 0, 255 ) );
} else if( speed > 1500 && speed <= 2000 ) { } else if( speed > 1500 && speed <= 2000 ) {
runMotor( DW_FORWARD, in1, in2, map(speed, 1500, 2000, 0, 255 ) );
printf( "%d - %d\n", speed, map(speed, 1500, 2000, 0, 255 ) ); printf( "%d - %d\n", speed, map(speed, 1500, 2000, 0, 255 ) );
} else if( speed > 0 && speed <= 255 ) { } else if( speed > 0 && speed <= 255 ) {
runMotor( DW_FORWARD, in1, in2, speed ); runMotor( DW_FORWARD, in1, in2, speed );