Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.10"
python-version: "3.12"
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and a source tarball
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v1
Expand Down
11 changes: 11 additions & 0 deletions picoscope/picobase.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,17 @@ def getTriggerTimeOffset(self, segmentIndex=0):
"""
return self._lowLevelGetTriggerTimeOffset(segmentIndex)

def getTriggerInfo(self, segmentIndex=0):
"""
Get the trigger info structure

Parameter
-------
segmentIndex
index of the memory segment
"""
return self._lowLevelGetTriggerInfo(segmentIndex)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

def flashLed(self, times=5, start=False, stop=False):
"""
Flash the front panel LEDs.
Expand Down
21 changes: 18 additions & 3 deletions picoscope/ps6000a.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ def updateFirmwareProgress(function):
return callback(function)


from ctypes import Structure
class PICO_TRIGGER_INFO(Structure):
_pack_ = 1
_fields_ = [("status", c_uint32),
("segmentIndex", c_uint64),
("triggerIndex", c_uint64),
("triggerTime", c_double),
("timeUnits", c_uint32),
("missedTriggers", c_uint64),
("timeStampCounter", c_uint64)]


class PS6000a(_PicoscopeBase):
"""The following are low-level functions for the ps6000A.

Expand Down Expand Up @@ -852,9 +864,12 @@ def _lowLevelGetNoOfCaptures(self):
def _lowLevelGetNoOfProcessedCaptures(self):
raise NotImplementedError()

def _lowLevelGetTriggerInfo(self):
raise NotImplementedError()

def _lowLevelGetTriggerInfo(self,segmentIndex):
triggerInfo = PICO_TRIGGER_INFO()
m = self.lib.ps6000aGetTriggerInfo(c_int16(self.handle), byref(triggerInfo), c_uint64(segmentIndex), 1)
self.checkResult(m)
return triggerInfo

def _lowLevelMemorySegmentsBySamples(self):
raise NotImplementedError()

Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@
'Topic :: System :: Hardware',
'Topic :: Scientific/Engineering',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],

python_requires=">=3.9",
# What does your project relate to?
keywords='picoscope peripherals hardware oscilloscope ATE',
install_requires=['numpy'],
Expand Down
Loading