Nothing Special   »   [go: up one dir, main page]

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

Global: Change the division of float values to multiplication #28258

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

muramura
Copy link
Contributor

The STM32 is better at multiplication than division.

Copy link
Contributor
@tpwrules tpwrules left a comment

Choose a reason for hiding this comment

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

This overall looks good and matches the official coding guidelines. I believe all the exponents line up too.

@@ -603,7 +603,7 @@ int decodeECU_TelemetrySlow1PacketStructure(const void* _pg_pkt, ECU_TelemetrySl

// Input voltage in Volts
// Range of voltage is 0.0f to 25.5f.
_pg_user->voltage = float32ScaledFrom1UnsignedBytes(_pg_data, &_pg_byteindex, 0.0f, 1.0f/10.0f);
_pg_user->voltage = float32ScaledFrom1UnsignedBytes(_pg_data, &_pg_byteindex, 0.0f, 0.1f);
Copy link
Contributor

Choose a reason for hiding this comment

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

Files in this directory are generated, I don't think we should change them. I think constant elimination will take care of this anyway.

@peterbarker
Copy link
Contributor

We wil want this rebased on top of the other PR which does very similar things

@peterbarker
Copy link
Contributor

The other PR this will be rebased on: #26855

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.

4 participants