From 3fd4eb6b42ced58942bb220351b08236ae300f98 Mon Sep 17 00:00:00 2001 From: Ron Sluiter Date: Thu, 2 Jul 2009 17:54:14 +0000 Subject: [PATCH] Backwards compatibility with ver:1.29 and earlier firmware. --- motorApp/OmsSrc/drvMAXv.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/motorApp/OmsSrc/drvMAXv.cc b/motorApp/OmsSrc/drvMAXv.cc index c80c8b31..9709e6a7 100644 --- a/motorApp/OmsSrc/drvMAXv.cc +++ b/motorApp/OmsSrc/drvMAXv.cc @@ -2,9 +2,9 @@ FILENAME... drvMAXv.cc USAGE... Motor record driver level support for OMS model MAXv. -Version: $Revision: 1.23 $ +Version: $Revision: 1.24 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-06-18 19:09:15 $ +Last Modified: $Date: 2009-07-02 17:54:14 $ */ /* @@ -68,6 +68,9 @@ Last Modified: $Date: 2009-06-18 19:09:15 $ * 12 01-05-09 rls - Dirk Zimoch's (PSI) bug fix for set_status() overwriting * the home switch status in the response string. * 13 06-18-09 rls - Make MAXvSetup() error messages more prominent. + * 14 07-02-09 rls - backwards compatibility with ver:1.29 and earlier + * firmware. OMS changed from '' to '' for + * RA, QA, EA and RL command with ver:1.30 * */ @@ -646,8 +649,12 @@ static int recv_mess(int card, char *com, int amount) bufptr = readbuf(pmotor, bufptr); if (--amount > 0) - *(bufptr++) = ','; /* Replace zero byte with delimiter ','. */ - + { + if (*(bufptr-1) == '\n') /* For ver:1.29 and before firmware, */ + *(bufptr-1) = ','; /* replace <0> with <,><0>. */ + else /* For ver:1.30 and after firmware, */ + *(bufptr++) = ','; /* replace with <,>. */ + } } while (amount > 0); Debug(4, "recv_mess(): card#%d - %s\n", card, com);