Ejemplo n.º 1
0
    def updateSampleRateFreq(self, _=None):
        if self.ps.handle is not None:
            paramSR = self.findParam('samplerate')
            paramSL = self.findParam('samplelength')

            try:
                self.ps.setSamplingFrequency(paramSR.getValue(), paramSL.getValue() + self.findParam('sampleoffset').getValue(), 1)
            except IOError:
                raise Warning("Invalid combination of sample rate, sample length, and/or sample offset!")

            #Need this callback as otherwise the setValue() is overwritten when the user toggles off, might be fixed
            #with Adriel's new parameterTypes, will have to test again
            self._faketimer = timer.runTask(self.updateSampleRateFreqUI, 0.1, True, True)
Ejemplo n.º 2
0
    def updateSampleRateFreq(self, _=None):
        if self.ps.handle is not None:
            paramSR = self.findParam('samplerate')
            paramSL = self.findParam('samplelength')

            try:
                self.ps.setSamplingFrequency(paramSR.getValue(), paramSL.getValue() + self.findParam('sampleoffset').getValue(), 1)
            except IOError:
                raise Warning("Invalid combination of sample rate, sample length, and/or sample offset!")

            #Need this callback as otherwise the setValue() is overwritten when the user toggles off, might be fixed
            #with Adriel's new parameterTypes, will have to test again
            self._faketimer = timer.runTask(self.updateSampleRateFreqUI, 0.1, True, True)
Ejemplo n.º 3
0
    def __init__(self, parentParam=None):
        ScopeTemplate.__init__(self, parentParam)

        self.qtadc = openadc_qt.OpenADCQt()
        self.qtadc.dataUpdated.connect(self.doDataUpdated)
        # Bonus Modules for ChipWhisperer
        self.advancedSettings = None
        self.advancedSAD = None
        self.digitalPattern = None
        self.refreshTimer = timer.runTask(self.dcmTimeout, 1)

        scopes = pluginmanager.getPluginsInDictFromPackage("chipwhisperer.capture.scopes.openadc_interface", True, False, self, self.qtadc)
        self.scopetype = scopes[OpenADCInterface_NAEUSBChip._name]
        self.params.addChildren([
            {'name':'Connection', 'key':'con', 'type':'list', 'values':scopes, 'get':self.getCurrentScope, 'set':self.setCurrentScope, 'childmode':'parent'},
            {'name':'Auto-Refresh DCM Status', 'type':'bool', 'value':True, 'action':self.setAutorefreshDCM}
        ])
        self.params.init()
        self.params.append(self.qtadc.getParams())
Ejemplo n.º 4
0
    def __init__(self):
        ScopeTemplate.__init__(self)

        self.qtadc = openadc_qt.OpenADCQt()
        self.qtadc.dataUpdated.connect(self.newDataReceived)
        # Bonus Modules for ChipWhisperer
        self.advancedSettings = None
        self.advancedSAD = None
        self.digitalPattern = None

        self._is_connected = False

        scopes = pluginmanager.getPluginsInDictFromPackage(
            "chipwhisperer.capture.scopes.openadc_interface", True, False,
            self.qtadc)
        self.scopetype = scopes[OpenADCInterface_NAEUSBChip._name]
        self.params.addChildren([{
            'name': 'Connection',
            'key': 'con',
            'type': 'list',
            'values': scopes,
            'get': self.getCurrentScope,
            'set': self.setCurrentScope,
            'childmode': 'parent'
        }, {
            'name':
            'Auto-Refresh DCM Status',
            'type':
            'bool',
            'value':
            True,
            'action':
            self.setAutorefreshDCM,
            'help':
            "Refresh status/info automatically every second."
        }])
        self.params.init()
        self.params.append(self.qtadc.getParams())

        self.refreshTimer = timer.runTask(self.dcmTimeout, 1)
        self.refreshTimer.start()