Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VOffset converted to c_double instead of c_float #194

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

thennen
Copy link
Contributor

@thennen thennen commented Nov 17, 2023

The ps6000a API uses a double for the analogueOffset parameter of ps6000aSetChannelOn.

For ps6000, the equivalent parameter was a float, and I imagine this was mistakenly copied over to ps6000a.py

Interestingly calling with a float did not raise an error, and the offset value just had no effect.

After this change, the voltage offset setting works as intended.

@thennen
Copy link
Contributor Author

thennen commented Nov 17, 2023

Here are the relevant entries in the picoscope documentation pdfs:

PicoScope 6000 Series Programmer's Guide (pg 65)

3.34 ps6000SetChannel

PICO_STATUS ps6000SetChannel
(
int16_t handle,
PS6000_CHANNEL channel,
int16_t enabled,
PS6000_COUPLING type,
PS6000_RANGE range,
float analogueOffset,
PS6000_BANDWIDTH_LIMITER bandwidth
)

PicoScope 6000 Series (A API) Programmer's Guide (pg 74)

3.41 ps6000aSetChannelOn - enable and set options for one channel

PICO_STATUS ps6000aSetChannelOn
(
int16_t handle,
PICO_CHANNEL channel,
PICO_COUPLING coupling,
PICO_CONNECT_PROBE_RANGE range,
double analogueOffset,
PICO_BANDWIDTH_LIMITER bandwidth
)

@hmaarrfk hmaarrfk merged commit c38399f into colinoflynn:master Nov 17, 2023
2 checks passed
@hmaarrfk
Copy link
Collaborator

Great thanks. i was just about to ask

@hmaarrfk
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants