Skip to content

Feature/digital channels#32

Merged
NejcKle merged 3 commits intodevfrom
feature/digital-channels
Jun 9, 2023
Merged

Feature/digital channels#32
NejcKle merged 3 commits intodevfrom
feature/digital-channels

Conversation

@NejcKle
Copy link
Copy Markdown
Collaborator

@NejcKle NejcKle commented Jun 2, 2023

This PR implements digital channels to the PPK2 API.

On each sampling interval raw digital channel data is returned.

This data must then be converted in the user application. For that purpose a digital_channels method has been implemented. The method returns a 2D matrix, where the rows represent each digital channel. The row contains 1s and 0s, representing the HIGH and LOW state of that particular digital channel.

Both examples have been updated to include the digital channel data.

@NejcKle NejcKle requested a review from wlgrd June 2, 2023 10:28
Copy link
Copy Markdown
Collaborator

@wlgrd wlgrd left a comment

Choose a reason for hiding this comment

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

Great work!

@NejcKle NejcKle merged commit 2864132 into dev Jun 9, 2023
@NejcKle NejcKle deleted the feature/digital-channels branch June 9, 2023 13:32
return samples # return list of samples, handle those lists in PPK2 API wrapper
# return list of samples and raw digital outputs
# handle those lists in PPK2 API wrapper
return samples, raw_digital_output
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FYI this is a breaking change for any code that uses get_samples.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The example was updated to show that :) Update your code with get_samples, _ = ppk2.get_samples(data)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yeah it all made sense once I found this PR! I had a tester rig break on the update from 0.9.1 and 0.9.2. I'll pin the exact version next time!

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.

3 participants