Protect against divide by zero

This commit is contained in:
MarkRivers
2004-07-28 21:39:39 +00:00
parent 58e7e99458
commit 4be8b77a6c
+1
View File
@@ -388,6 +388,7 @@ STATIC int set_status(int card, int signal)
status.Bits.EA_HOME=0;
/* Motor position */
if (resolution == 0.) resolution = 1.;
motorData = pos / resolution;
if (motorData == motor_info->position)