-
Notifications
You must be signed in to change notification settings - Fork 55
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
Ensure float operations in SoundSynthesizerEffects
& CompassCalibrator
.
#454
base: master
Are you sure you want to change the base?
Conversation
f0ea2e4
to
a917616
Compare
SoundSynthesizerEffects
.SoundSynthesizerEffects
& CompassCalibrator
.
a917616
to
1d94b2b
Compare
1d94b2b
to
e67bb09
Compare
As the PR in codal-core has been merged, I've udpated target-locked.json to point to that commit and that shows the half KB of flash saving from having fewer/smaller math functions included in the build. |
Avoid implicit int promotion to doubles when the final results are stored in floats, and use float versions of math function when the results are stored in floats as well.
e67bb09
to
d0abb3f
Compare
Build diffBase commit: 73329cea9f963fe3129f7f51c2a668dc50c952e5
|
Looks good - I'm not sure we want to include the target-locked.json though do we @microbit-carlos? |
While it is not really necessary for this PR, I actually do prefer when commits going to Normally the That doesn't strictly applies to this PR though, as it doesn't really need lancaster-university/codal-core@b395ae3 to compile, so happy to remove it in this case. |
Related PR, which includes files in codal-core like
LevelDetectorSPL
, and together with this PR it saves >400 bytes of flash:Edit: Also ensured float literals in a couple of other files to avoid implicit double promotion.