eldruin / mlx9061x-rs

Platform-agnostic Rust driver for MLX90614/MLX90615 Infrarred thermometer
Apache License 2.0
6 stars 5 forks source link

feat: new method to get object tempature in Fahrenheit as `Result<u16, Error<E>>`. #5

Closed antonio-hickey closed 1 year ago

antonio-hickey commented 1 year ago

I've been trying all types of hacky ways to get my microcontroller (arduino uno r3) to support any type of calculation with the value returned from object1_temperature() (yes I unwrapped the result), but running on bare metal makes it really annoying to use floats. I can't even print out the value, so I would like to add 2 new methods to Mlx90614 for pulling object1 & object2 temperature in Fahrenheit as Result<u16, Error<E>>. & 1 new method to Mlx90615 for pulling object temperature in Fahrenheit as well.

antonio-hickey commented 1 year ago

Probably better to just convert the value to Fahrenheit yourself after getting the value, now that we have methods to read temp values as integers I believe this not needed.