mirror of
https://github.com/Binary-Coalescence/motorDSM.git
synced 2025-08-04 21:55:40 -05:00
Fixed replyvalue comparison data type.
This commit is contained in:
@@ -391,7 +391,7 @@ asynStatus MD90Axis::poll(bool *moving)
|
|||||||
if (comStatus) goto skip;
|
if (comStatus) goto skip;
|
||||||
// The response string is of the form "0: Power supply enabled state: 1"
|
// The response string is of the form "0: Power supply enabled state: 1"
|
||||||
sscanf(pC_->inString_, "%d: %[^:]: %d", &replyStatus, replyString, &replyValue);
|
sscanf(pC_->inString_, "%d: %[^:]: %d", &replyStatus, replyString, &replyValue);
|
||||||
driveOn = (replyValue == '1') ? 1:0;
|
driveOn = (replyValue == 1) ? 1:0;
|
||||||
setIntegerParam(pC_->motorStatusPowerOn_, driveOn);
|
setIntegerParam(pC_->motorStatusPowerOn_, driveOn);
|
||||||
|
|
||||||
// Read the home status
|
// Read the home status
|
||||||
@@ -400,7 +400,7 @@ asynStatus MD90Axis::poll(bool *moving)
|
|||||||
if (comStatus) goto skip;
|
if (comStatus) goto skip;
|
||||||
// The response string is of the form "0: Home status: 1"
|
// The response string is of the form "0: Home status: 1"
|
||||||
sscanf(pC_->inString_, "%d: %[^:]: %d", &replyStatus, replyString, &replyValue);
|
sscanf(pC_->inString_, "%d: %[^:]: %d", &replyStatus, replyString, &replyValue);
|
||||||
homed = (replyValue == '1') ? 1:0;
|
homed = (replyValue == 1) ? 1:0;
|
||||||
setIntegerParam(pC_->motorStatusHomed_, homed);
|
setIntegerParam(pC_->motorStatusHomed_, homed);
|
||||||
|
|
||||||
// Read the moving status of this motor
|
// Read the moving status of this motor
|
||||||
@@ -409,7 +409,7 @@ asynStatus MD90Axis::poll(bool *moving)
|
|||||||
if (comStatus) goto skip;
|
if (comStatus) goto skip;
|
||||||
// The response string is of the form "0: Current status value: 0"
|
// The response string is of the form "0: Current status value: 0"
|
||||||
sscanf(pC_->inString_, "%d: %[^:]: %d", &replyStatus, replyString, &replyValue);
|
sscanf(pC_->inString_, "%d: %[^:]: %d", &replyStatus, replyString, &replyValue);
|
||||||
done = (replyValue == '2') ? 0:1;
|
done = (replyValue == 2) ? 0:1;
|
||||||
setIntegerParam(pC_->motorStatusDone_, done);
|
setIntegerParam(pC_->motorStatusDone_, done);
|
||||||
*moving = done ? false:true;
|
*moving = done ? false:true;
|
||||||
switch(replyValue) {
|
switch(replyValue) {
|
||||||
|
Reference in New Issue
Block a user