|
|
@ -198,12 +198,14 @@ void DeviceIoControlService::WarningLight_setState(int r, int g, int b, int warn |
|
|
|
#define COMPONENT HardwareComponent::PositivePressureProportional
|
|
|
|
void DeviceIoControlService::PosiPressureProp_setValve(int valveValue) { //
|
|
|
|
if (isInPc()) return; |
|
|
|
|
|
|
|
valveValue = valveValue / 100.0 * 255; |
|
|
|
CAN_MASTER->proportionalSetValve(GET_BOARDID(), GET_SUBID(), valveValue); |
|
|
|
} |
|
|
|
int DeviceIoControlService::PosiPressureProp_readPos() { |
|
|
|
if (isInPc()) return 0; |
|
|
|
return CAN_MASTER->proportionalReadPos(GET_BOARDID(), GET_SUBID()); |
|
|
|
int pos = CAN_MASTER->proportionalReadPos(GET_BOARDID(), GET_SUBID()); |
|
|
|
pos = pos / 255.0 * 100; |
|
|
|
return pos; |
|
|
|
} |
|
|
|
bool DeviceIoControlService::PosiPressureProp_isBusy() { |
|
|
|
if (isInPc()) return false; |
|
|
@ -214,11 +216,15 @@ bool DeviceIoControlService::PosiPressureProp_isBusy() { |
|
|
|
#define COMPONENT HardwareComponent::NegativePressureProportional
|
|
|
|
void DeviceIoControlService::NegaPressureProp_setValve(int valveValue) { |
|
|
|
if (isInPc()) return; |
|
|
|
valveValue = valveValue / 100.0 * 255; |
|
|
|
CAN_MASTER->proportionalSetValve(GET_BOARDID(), GET_SUBID(), valveValue); |
|
|
|
} |
|
|
|
int DeviceIoControlService::NegaPressureProp_readPos() { |
|
|
|
if (isInPc()) return 0; |
|
|
|
return CAN_MASTER->proportionalReadPos(GET_BOARDID(), GET_SUBID()); |
|
|
|
|
|
|
|
int pos = CAN_MASTER->proportionalReadPos(GET_BOARDID(), GET_SUBID()); |
|
|
|
pos = pos / 255.0 * 100; |
|
|
|
return pos; |
|
|
|
} |
|
|
|
bool DeviceIoControlService::NegaPressureProp_isBusy() { |
|
|
|
if (isInPc()) return false; |
|
|
|