From 57bb90d8019098a9b8fe63093498862ce6551017 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 8 Nov 2013 01:34:35 +0200 Subject: [PATCH] Keep zero speed as is --- arducontrol/mfx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arducontrol/mfx.c b/arducontrol/mfx.c index 6e843aa..293765f 100644 --- a/arducontrol/mfx.c +++ b/arducontrol/mfx.c @@ -429,7 +429,9 @@ uint8_t mfx_command(const uint8_t *cmd, uint8_t length) uint8_t speed_dir = cmd[3]; if((speed_dir&0x7F)==0x7F) return INVALID_VALUE; - ++speed_dir; + // Skip emergency stop + if(speed_dir>0) + ++speed_dir; if(cmd[0]==MFX_SPEED) mfx_speed_packet(addr, speed_dir); -- 2.45.2