Commit 85786588 authored by Marek Vrbka's avatar Marek Vrbka
Browse files

Update lcd.py

parent f68b3e25
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -181,9 +181,16 @@ class LCDSpyDevice:
        print(f"Data channels(d7-d4): {self.d7_channel} {self.d6_channel} {self.d5_channel} {self.d4_channel}")
        self.spying = True
        self.digilent_device.acquisitionModeSet(self.digilent_device.ACQMODE.RECORD)
        self.digilent_device.dividerSet(1000)
        self.digilent_device.dividerSet(4000)
        self.digilent_device.sampleFormatSet(16)
        self.digilent_device.triggerPositionSet(1)
        # Note, this is accessing the raw API since the class library lacks it
        hdwf = self.digilent_device.hdwf
        dwf.dwfdll.FDwfDigitalInTriggerResetSet(hdwf, 0, 0, 1 << self.enable_channel, 0)
        dwf.dwfdll.FDwfDigitalInTriggerSet(hdwf, 0, 1 << self.enable_channel, 0, 0)
        # Min - 0.9ms, max - 1.5ms
        dwf.dwfdll.FDwfDigitalInTriggerLengthSet(hdwf, 0.0009, 0.0015, 0)
        dwf.dwfdll.FDwfDigitalInTriggerCountSet(hdwf, 1, 0)

        self.digilent_device.triggerSet(0, 0, (1 << self.enable_channel), 0)
        self.digilent_device.configure(False, True)