diff --git a/NIDAQmxInterface.cpp b/NIDAQmxInterface.cpp index 23ad797..adc1469 100644 --- a/NIDAQmxInterface.cpp +++ b/NIDAQmxInterface.cpp @@ -223,9 +223,9 @@ void NIDAQmxInterface::DAQmxSetDO(uInt8 qry_port_bit, bool arm_timer, bool isSet if (daq->do_port != 0) { if(isSet){ - daq->do_bit_wrt |= 1 << qry_port_bit-1; + daq->do_bit_wrt |= (1 << (qry_port_bit-1)); }else{ - daq->do_bit_wrt &= ~(1 << qry_port_bit-1); + daq->do_bit_wrt &= ~(1 << (qry_port_bit-1)); } DAQmxErrChk(DAQmxWriteDigitalU8(daq->do_port, 1, 1, 10.0, DAQmx_Val_GroupByChannel, &daq->do_bit_wrt, &written, NULL)); }