Skip to content

Replace double literals and fns with floats.#531

Open
jaguilar wants to merge 1 commit intosimplefoc:devfrom
jaguilar:opt_float_lit
Open

Replace double literals and fns with floats.#531
jaguilar wants to merge 1 commit intosimplefoc:devfrom
jaguilar:opt_float_lit

Conversation

@jaguilar
Copy link
Copy Markdown

Description

In all cases, these literals are intended to be used in floating point operations. Floating point acceleration is much more common on devices where SimpleFOC runs. Even where no acceleration is present, soft floats are universally more efficient than soft doubles.

Additionally, fix several cases where fabs or flog are used instead of fabsf or flogf.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Ran my SimpleFOC test program.

Test Configuration/Setup:

  • Hardware: STM32G464 Nucleo board
  • IDE: Plain STM32 with Arduino wrapper
  • MCU package version (stm32duino/arduino-esp32/..): N/A

In all cases, these literals are intended to be used in floating point
operations. Floating point acceleration is much more common on devices
where SimpleFOC runs. Even where no acceleration is present, soft floats
are universally more efficient than soft doubles.

Additionally, fix several cases where fabs or flog are used instead
of fabsf or flogf.
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