ARMmbed / mbed-semtech-lora-rf-drivers

Semtech's LoRa RF drivers for mbed OS
Other
31 stars 25 forks source link

Replace floating point with integer operations #45

Closed gpsimenos closed 5 years ago

gpsimenos commented 5 years ago

The Mbed OS Core team has been investigating the usage of floating point in Mbed example projects. The goal is to remove floating point where possible to reduce the binary size on devices without an FPU.

This driver uses floating points but all instances can be replaced with equivalent integer operations without losing precision.

@hugueskamba @evedon @AnttiKauppila

hugueskamba commented 5 years ago

@gpsimenos @AnttiKauppila is there tests for this? There are quite a lot of calculation changes and it would be good to know that they are still correct at least with some unit tests. How do we know nothing is broken?

gpsimenos commented 5 years ago

@gpsimenos @AnttiKauppila is there tests for this? There are quite a lot of calculation changes and it would be good to know that they are still correct at least with some unit tests. How do we know nothing is broken?

I agree. I have double checked the changes and in principle I trust they are correct, but I can't guarantee I haven't missed anything, especially because I'm not very familiar with this specific radio. I haven't done any tests apart from verifying a few example calculations on paper with default values from the datasheet.

This needs to be tested more thoroughly with unit tests or a real device, or at least reviewed by someone more familiar with the radio before merging.

evedon commented 5 years ago

This work is put on hold pending real use case for it.