-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Change BitmapTransformA-F() methods to accept a single float... #9592
Conversation
…ing to the appropriate fixed-point internally. No more fiddly 8.8 / 1.15 fixed-point math in user code.
This is a breaking change to the API. The API is I don't really have any idea what the client base of We generally make breaking changes on a major-version boundary, in this case 10.0, which is not imminent by any means. We often try to make the intermediate versions handle both cases for a while. In this case, the old style takes two arguments, and the new style takes one, so they could be distinguished that way, but it would a noticeable amount of extra code. |
Side comment re development practices. Instead of submitting PR's from your |
Right, these methods() are visible to the end user: I'll look at a better implementation that's backwards-compatible. And thanks, a branch per PR is a good idea. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks - will mark this as "Changes Requested"
The setmodel() method controls the behavior So existing code will continue to work unchanged Subsequent releases of the ``eve`` library will call setmodel() to enable the new behavior Confirmed all code paths on EVE hardware
The When switched into "new" mode it accepts the new argument formats. It wasn't much more code to handle this. I've added coverage in my test cases for both modes, and it passes on (Note that I had to turn off |
So, just to clarify my understanding: is the 2-ints-vs-1-float difference a difference in the eve displays themselves, from older to newer versions, or do they all have the same firmware? I was thinking you could decide which computation to do based on the number of args to each transform function: if two args (ints) are supplied, do it the old way, if one arg (float), do it the new way. |
This is an EVE hardware function, and it works in fixed-point coordinates on all the EVE series. What this change is doing is hiding the fixed-point math, so the user code can use floats.
Right, I thought of doing this. But two of the methods ( There's also a wrinkle in that the hardware got an upgrade between BT810 and BT815, adding a "high-precision" fixed-point format. The code now deals with this correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright - thanks!
…converting to the appropriate fixed-point internally.
No more fiddly 8.8 / 1.15 fixed-point math in user code.
Confirmed on EVE hardware