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

CA PV: Write any 32 bit long, signed or unsigned #2554

Merged
merged 2 commits into from
Feb 17, 2023
Merged

Conversation

kasemir
Copy link
Collaborator

@kasemir kasemir commented Feb 17, 2023

Channel Access doesn't have "long" (64 bit).
It only has 32 bit "int", and they're signed.

A value of 0x80000000, while a 32 bit value, exceeds the value range of a 32 bit signed integer. It was then written as a double, losing precision.
Now the JCA_PV detects if such a long value fits into 32 bits as a signed integer.

In the display builder or probe, when selecting Hex as the display format this now allows entering and displaying any values from 0x00000000 to 0xFFFFFFFF, whereas previously numbers beyond 0x7FFFFFFF could not be entered, had to enter negative values.

@kasemir kasemir merged commit 55577fb into master Feb 17, 2023
@kasemir kasemir deleted the hex_unsigned branch February 17, 2023 17:11
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.

1 participant