|
M5Unit-THERMO 0.3.0 git rev:4c4f8b5
|
Unit NCIR2. More...
#include <unit_NCIR2.hpp>
Classes | |
| struct | config_t |
| Settings for begin. More... | |
Public Member Functions | |
| UnitNCIR2 (const uint8_t addr=DEFAULT_ADDRESS) | |
| virtual bool | begin () override |
| virtual void | update (const bool force=false) override |
| bool | readFirmwareVersion (uint8_t &ver) |
| Read the firmware version. | |
Settings for begin | |
| config_t | config () |
| Gets the configration. | |
| void | config (const config_t &cfg) |
| Set the configration. | |
Measurement data by periodic | |
| float | temperature () const |
| Oldest temperature. | |
| float | celsius () const |
| Oldest celsius. | |
| float | fahrenheit () const |
| Oldest fahrenheit. | |
Periodic measurement | |
| bool | startPeriodicMeasurement (const uint32_t interval) |
| Start periodic measurement. | |
| bool | startPeriodicMeasurement () |
| Start periodic measurement in the current settings. | |
| bool | stopPeriodicMeasurement () |
| Stop periodic measurement. | |
Single shot measurement | |
| bool | measureSingleshot (ncir2::Data &d) |
| Measurement single shot. | |
Settings | |
| bool | readEmissivity (uint16_t &raw) |
| Read the emissivity. | |
| bool | readEmissivity (float &e) |
| Read the emissivity. | |
| bool | writeEmissivity (const uint16_t raw) |
| Write the emissivity. | |
| template<typename T , typename std::enable_if< std::is_floating_point< T >::value, std::nullptr_t >::type = nullptr> | |
| bool | writeEmissivity (const T e) |
| Write the emissivity. | |
Alarm | |
| bool | readAlarmTemperature (const bool highlow, int16_t &raw) |
| Read the alarm temperature threshold. | |
| bool | readAlarmTemperature (const bool highlow, float &celsius) |
| Read the alarm temperature threshold. | |
| bool | writeAlarmTemperature (const bool highlow, const int16_t raw) |
| Write the alarm temperature threshold. | |
| template<typename T , typename std::enable_if< std::is_floating_point< T >::value, std::nullptr_t >::type = nullptr> | |
| bool | writeAlarmTemperature (const bool highlow, const T celsius) |
| Write the alarm temperature threshold. | |
| bool | readAlarmLED (const bool highlow, uint32_t &rgb) |
| Read the alarm LED color. | |
| bool | writeAlarmLED (const bool highlow, const uint32_t rgb) |
| Write the alarm LED color. | |
| bool | writeAlarmLED (const bool highlow, const uint8_t r, const uint8_t g, const uint8_t b) |
| Write the alarm LED color. | |
| bool | readAlarmBuzzer (const bool highlow, uint16_t &freq, uint16_t &interval, uint8_t &rawDuty) |
| Read the alarm buzzer settings. | |
| bool | readAlarmBuzzer (const bool highlow, uint16_t &freq, uint16_t &interval, float &duty) |
| Read the alarm buzzer settings. | |
| bool | writeAlarmBuzzer (const bool highlow, const uint16_t freq, const uint16_t interval, const uint8_t rawDuty) |
| Write the alarm buzzer settings. | |
| template<typename T , typename std::enable_if< std::is_floating_point< T >::value, std::nullptr_t >::type = nullptr> | |
| bool | writeAlarmBuzzer (const bool highlow, const uint16_t freq, const uint16_t interval, const T duty) |
| Write the alarm buzzer settings. | |
Buzzer | |
| bool | readBuzzer (uint16_t &freq, uint8_t &rawDuty) |
| Read the buzzer settings. | |
| bool | readBuzzer (uint16_t &freq, float &duty) |
| Write the buzzer settings. | |
| bool | writeBuzzer (const uint16_t freq, const uint8_t rawDuty) |
| Write the buzzer settings. | |
| template<typename T , typename std::enable_if< std::is_floating_point< T >::value, std::nullptr_t >::type = nullptr> | |
| bool | writeBuzzer (const uint16_t freq, const T duty) |
| Write the buzzer settings. | |
| bool | readBuzzerControl (bool &enabled) |
| Read the Buzzer control. | |
| bool | writeBuzzerControl (const bool enabled) |
| Write the Buzzer control. | |
LED | |
| bool | readLED (uint32_t &rgb) |
| Read the LED color. | |
| bool | writeLED (const uint32_t rgb) |
| Write the LED color. | |
| bool | writeLED (const uint8_t r, const uint8_t g, const uint8_t b) |
| Write the LED color. | |
Chip temperature | |
| bool | readChipTemperature (ncir2::Data &d) |
| Read the Chip temperature. | |
Flash | |
| bool | writeConfig () |
| Write configuration to inner flash. | |
Button | |
| bool | readButtonStatus (bool &press) |
| Read the button status. | |
| bool | isPressed () const |
| Is button pressed? | |
| bool | wasPressed () const |
| Was button pressed? | |
| bool | wasReleased () |
| Was button released? | |
I2C Address | |
| |
| bool | changeI2CAddress (const uint8_t i2c_address) |
| Change device I2C address. | |
| bool | readI2CAddress (uint8_t &i2c_address) |
| Read device I2C address. | |
Protected Member Functions | |
| bool | start_periodic_measurement (const uint32_t interval) |
| bool | start_periodic_measurement () |
| bool | stop_periodic_measurement () |
| bool | read_temperature (const uint8_t reg, uint8_t v[2]) |
| bool | write_emissivity (const float e) |
| bool | write_alarm_temperature (const bool highlow, const float celsius) |
| bool | write_alarm_buzzer (const bool highlow, const uint16_t freq, const uint16_t interval, const float duty) |
| bool | write_buzzer (const uint16_t freq, const float duty) |
| M5_UNIT_COMPONENT_PERIODIC_MEASUREMENT_ADAPTER_HPP_BUILDER (UnitNCIR2, ncir2::Data) | |
Unit NCIR2.
|
inline |
Oldest celsius.
| bool m5::unit::UnitNCIR2::changeI2CAddress | ( | const uint8_t | i2c_address | ) |
Change device I2C address.
| i2c_address | I2C address |
|
inline |
Oldest fahrenheit.
|
inline |
Is button pressed?
| bool m5::unit::UnitNCIR2::measureSingleshot | ( | ncir2::Data & | d | ) |
Measurement single shot.
| [out] | d | Measuerd data |
| bool m5::unit::UnitNCIR2::readAlarmBuzzer | ( | const bool | highlow, |
| uint16_t & | freq, | ||
| uint16_t & | interval, | ||
| float & | duty ) |
Read the alarm buzzer settings.
| highlow | Target False:low True:high | |
| [out] | freq | Frequency |
| [out] | interval | Interval(ms) [1 - 5000] |
| [out] | duty | Duty |
| bool m5::unit::UnitNCIR2::readAlarmBuzzer | ( | const bool | highlow, |
| uint16_t & | freq, | ||
| uint16_t & | interval, | ||
| uint8_t & | rawDuty ) |
Read the alarm buzzer settings.
| highlow | Target False:low True:high | |
| [out] | freq | Frequency |
| [out] | interval | Interval(ms) [1 - 5000] |
| [out] | rawDuty | Duty (0:0.0f 255:1.0f) |
| bool m5::unit::UnitNCIR2::readAlarmLED | ( | const bool | highlow, |
| uint32_t & | rgb ) |
Read the alarm LED color.
| highlow | Target False:low True:high | |
| [out] | rgb | RGB24 color |
| bool m5::unit::UnitNCIR2::readAlarmTemperature | ( | const bool | highlow, |
| float & | celsius ) |
Read the alarm temperature threshold.
| highlow | Target False:low True:high | |
| [out] | celsius | Temperature |
| bool m5::unit::UnitNCIR2::readAlarmTemperature | ( | const bool | highlow, |
| int16_t & | raw ) |
Read the alarm temperature threshold.
| highlow | Target False:low True:high | |
| [out] | raw | Temperature (raw) |
| bool m5::unit::UnitNCIR2::readButtonStatus | ( | bool & | press | ) |
Read the button status.
| [out] | press | Press if true |
| bool m5::unit::UnitNCIR2::readBuzzer | ( | uint16_t & | freq, |
| float & | duty ) |
Write the buzzer settings.
| [out] | freq | Frequency |
| [out] | duty | Duty |
| bool m5::unit::UnitNCIR2::readBuzzer | ( | uint16_t & | freq, |
| uint8_t & | rawDuty ) |
Read the buzzer settings.
| [out] | freq | Frequency |
| [out] | rawDuty | Duty (0:0.0f 255:1.0f) |
| bool m5::unit::UnitNCIR2::readBuzzerControl | ( | bool & | enabled | ) |
Read the Buzzer control.
| [out] | enabled | True:enabled False;disabled |
| bool m5::unit::UnitNCIR2::readChipTemperature | ( | ncir2::Data & | d | ) |
Read the Chip temperature.
| [out] | d | Measuerd data |
| bool m5::unit::UnitNCIR2::readEmissivity | ( | float & | e | ) |
Read the emissivity.
| [out] | e | Emissivity |
| bool m5::unit::UnitNCIR2::readEmissivity | ( | uint16_t & | raw | ) |
Read the emissivity.
| [out] | raw | Raw emissivity |
| bool m5::unit::UnitNCIR2::readFirmwareVersion | ( | uint8_t & | ver | ) |
Read the firmware version.
| [out] | ver | Version |
| bool m5::unit::UnitNCIR2::readI2CAddress | ( | uint8_t & | i2c_address | ) |
Read device I2C address.
| [out] | i2c_address | I2C address |
| bool m5::unit::UnitNCIR2::readLED | ( | uint32_t & | rgb | ) |
Read the LED color.
| [out] | rgb | RGB24 color |
|
inline |
Start periodic measurement.
| interval | Measurement interval time (ms) |
|
inline |
Stop periodic measurement.
|
inline |
Oldest temperature.
|
inline |
Was button pressed?
|
inline |
Was button released?
|
inline |
Write the alarm buzzer settings.
| highlow | Target False:low True:high |
| freq | Frequency |
| interval | Interval(ms) [1 - 5000] |
| duty | Duty |
| bool m5::unit::UnitNCIR2::writeAlarmBuzzer | ( | const bool | highlow, |
| const uint16_t | freq, | ||
| const uint16_t | interval, | ||
| const uint8_t | rawDuty ) |
Write the alarm buzzer settings.
| highlow | Target False:low True:high |
| freq | Frequency |
| interval | Interval(ms) [1 - 5000] |
| rawDuty | Duty (0:0.0f 255:1.0f) |
|
inline |
Write the alarm LED color.
| highlow | Target False:low True:high |
| rgb | RGB24 color |
| bool m5::unit::UnitNCIR2::writeAlarmLED | ( | const bool | highlow, |
| const uint8_t | r, | ||
| const uint8_t | g, | ||
| const uint8_t | b ) |
Write the alarm LED color.
| highlow | Target False:low True:high |
| r | Red |
| g | Green |
| b | Blue |
| bool m5::unit::UnitNCIR2::writeAlarmTemperature | ( | const bool | highlow, |
| const int16_t | raw ) |
Write the alarm temperature threshold.
| highlow | Target False:low True:high |
| raw | Temperature (raw) |
|
inline |
Write the alarm temperature threshold.
| highlow | Target False:low True:high |
| celsius | Temperature |
|
inline |
Write the buzzer settings.
| freq | Frequency |
| duty | Duty |
| bool m5::unit::UnitNCIR2::writeBuzzer | ( | const uint16_t | freq, |
| const uint8_t | rawDuty ) |
Write the buzzer settings.
| freq | Frequency |
| rawDuty | Duty (0:0.0f 255:1.0f) |
| bool m5::unit::UnitNCIR2::writeBuzzerControl | ( | const bool | enabled | ) |
Write the Buzzer control.
| enabled | True:enabled False;disabled |
| bool m5::unit::UnitNCIR2::writeConfig | ( | ) |
Write configuration to inner flash.
Write Emissivity,Alarm,LED settings to flash
|
inline |
Write the emissivity.
| e | Emissivity |
| bool m5::unit::UnitNCIR2::writeEmissivity | ( | const uint16_t | raw | ) |
Write the emissivity.
| raw | Raw emissivity |
|
inline |
Write the LED color.
| rgb | RGB24 color |
| bool m5::unit::UnitNCIR2::writeLED | ( | const uint8_t | r, |
| const uint8_t | g, | ||
| const uint8_t | b ) |
Write the LED color.
| r | Red |
| g | Green |
| b | Blue |