@pradeeban
nintan/pstim.py imports nidaqmx at module level and immediately creates a hardware task:
import nidaqmx
from nidaqmx.constants import AcquisitionType
from nidaqmx.stream_writers import DigitalSingleChannelWriter
...
task = nidaqmx.Task()
task.do_channels.add_do_chan("Dev1/port0/line0")
Issues:
-
The nidaqmx package is not in requirements.txt
-
It crashes on any machine without National Instruments hardware/drivers
-
The global uglobal variable is modified by the main thread and read by pwm() thread without any thread synchronization (race condition)
-
The pwm() thread runs an infinite while True loop with no way to stop it cleanly
-
Device name "Dev1/port0/line0" is hardcoded — should be configurable via concore.params
@pradeeban
nintan/pstim.py imports nidaqmx at module level and immediately creates a hardware task:
Issues:
The nidaqmx package is not in requirements.txt
It crashes on any machine without National Instruments hardware/drivers
The global uglobal variable is modified by the main thread and read by pwm() thread without any thread synchronization (race condition)
The pwm() thread runs an infinite while True loop with no way to stop it cleanly
Device name "Dev1/port0/line0" is hardcoded — should be configurable via concore.params