MLX90614 data types (enums, Data struct, register fields, conversions)
More...
#include <array>
#include <cmath>
#include <cstdint>
#include <limits>
#include <m5_utility/stl/extension.hpp>
Go to the source code of this file.
|
| enum class | m5::unit::mlx90614::Output : uint8_t { TA_TO1
, TA_TO2
, TO2_Undefined
, TO1_TO2
} |
| | PWM output mode. More...
|
| |
| enum class | m5::unit::mlx90614::IIR : uint8_t {
Filter50
, Filter25
, Filter17
, Filter13
,
Filter100
, Filter80
, Filter67
, Filter57
} |
| | Infinite Impulse Response. More...
|
| |
| enum class | m5::unit::mlx90614::FIR : uint8_t {
Filter8
, Filter16
, Filter32
, Filter64
,
Filter128
, Filter256
, Filter512
, Filter1024
} |
| | Finite Impulse Response. More...
|
| |
| enum class | m5::unit::mlx90614::Gain : uint8_t {
Coeff1
, Coeff3
, Coeff6
, Coeff12_5
,
Coeff25
, Coeff50
, Coeff100
} |
| | Amplifier gain. More...
|
| |
| enum class | m5::unit::mlx90614::IRSensor : uint8_t { Single
, Dual
} |
| | Infra-Red Sensor mode. More...
|
| |
MLX90614 data types (enums, Data struct, register fields, conversions)
Kept apart from unit_MLX90614.hpp so the native (host) tests can include it without pulling in M5UnitComponent.
◆ FIR
Finite Impulse Response.
| Enumerator |
|---|
| Filter8 | 8 Not recommended
|
| Filter16 | 16 Not recommended
|
| Filter32 | 32 Not recommended
|
| Filter64 | 64 Not recommended
|
| Filter128 | 128
|
| Filter256 | 256
|
| Filter512 | 512
|
| Filter1024 | 1024
|
◆ Gain
Amplifier gain.
| Enumerator |
|---|
| Coeff1 | Bypassed.
|
| Coeff3 | 3
|
| Coeff6 | 6
|
| Coeff12_5 | 12.5
|
| Coeff25 | 25
|
| Coeff50 | 50
|
| Coeff100 | 100
|
◆ IIR
Infinite Impulse Response.
| Enumerator |
|---|
| Filter50 | 50% (a1 = 0.5, b1 = 0.5)
|
| Filter25 | 25% (a1 = 0.25, b1 = 0.75)
|
| Filter17 | 17% (a1 = 0.166(6), b1 = 0.833(3))
|
| Filter13 | 13% (a1 = 0.125, b1 = 0.875)
|
| Filter100 | 100% (a1 = 1, b1 = 0)
|
| Filter80 | 80% (a1 = 0.8, b1 = 0.2)
|
| Filter67 | 67% (a1 = 0.666, b1 = 0.333)
|
| Filter57 | 57% (a1 = 0.571, b1 = 0.428)
|
◆ IRSensor
Infra-Red Sensor mode.
| Enumerator |
|---|
| Single | Single IR Sensor.
|
| Dual | Dual IR Sensor.
|
◆ Output
PWM output mode.
| Enumerator |
|---|
| TA_TO1 | PWM1: Ta PWM2:To1 (Ambient & Object 1)
|
| TA_TO2 | PWM1: Ta PWM2:To2 (Ambient & Object 2)
|
| TO2_Undefined | PWM1: To2 PWM2:Undefined (Object 2)
|
| TO1_TO2 | PWM1: To1 PWM2:To2 (Object 1 & 2)
|
◆ celsius_to_taRaw()
| uint8_t m5::unit::mlx90614::celsius_to_taRaw |
( |
const float | c | ) |
|
|
inline |
Celsius to ambient temperature range raw (one byte of TaRange)
- Parameters
-
| c | Celsius (clamped to -38.2 - 125.0) |
- Returns
- Raw value (0.64 °C/LSB, offset -38.2 °C)
◆ celsius_to_toRaw()
| uint16_t m5::unit::mlx90614::celsius_to_toRaw |
( |
const float | c | ) |
|
|
inline |
Celsius to object temperature range raw (ToMin / ToMax)
- Parameters
-
| c | Celsius (clamped to -273.15 - 382.2) |
- Returns
- Raw value (0.01 K/LSB)
◆ emissivity_to_raw()
| uint16_t m5::unit::mlx90614::emissivity_to_raw |
( |
const float | e | ) |
|
|
inline |
Emissivity to emissivity raw.
- Parameters
-
| e | Emissivity (0.0 - 1.0, not clamped; the caller must validate it) |
- Returns
- Raw value
◆ raw_to_emissivity()
| float m5::unit::mlx90614::raw_to_emissivity |
( |
const uint16_t | e | ) |
|
|
inline |
Emissivity raw to emissivity.
- Parameters
-
- Returns
- Emissivity (0.0 - 1.0)
◆ taRaw_to_celsius()
| float m5::unit::mlx90614::taRaw_to_celsius |
( |
const uint8_t | t | ) |
|
|
inline |
Ambient temperature range raw (one byte of TaRange) to Celsius.
- Parameters
-
| t | Raw value (0.64 °C/LSB, offset -38.2 °C) |
- Returns
- Celsius
◆ toRaw_to_celsius()
| float m5::unit::mlx90614::toRaw_to_celsius |
( |
const uint16_t | t | ) |
|
|
inline |
Object temperature range raw (ToMin / ToMax) to Celsius.
- Parameters
-
- Returns
- Celsius