Skip to content

Added function to get PD offset by address in control panel#290

Closed
hahnnicholas wants to merge 2 commits intogoToMain:masterfrom
hahnnicholas:get_index
Closed

Added function to get PD offset by address in control panel#290
hahnnicholas wants to merge 2 commits intogoToMain:masterfrom
hahnnicholas:get_index

Conversation

@hahnnicholas
Copy link
Copy Markdown
Contributor

Simple lookup function.
This change allows using some CP functions without first having the index of each PD which might be required after add pds on the fly.

@sidcha
Copy link
Copy Markdown
Member

sidcha commented Mar 27, 2026

Hi @hahnnicholas , thanks for the PR and the effort it involved. But I think the application code is much cleaner place to do this (it already knows pd_info array offsets and the address for each PD in it).

For instance, in the python library, I do exactly that -- maintain a map of PD offset and PD address.

@sidcha sidcha closed this Mar 27, 2026
@sidcha
Copy link
Copy Markdown
Member

sidcha commented Mar 27, 2026

I did cherry-pick your format string patch downstream. Thanks.

sidcha pushed a commit that referenced this pull request Mar 27, 2026
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