Files
ESP32Marauder/esp32_marauder/TemperatureInterface.cpp
Just Call Me Koko 2f0d05a538 Develop (#121)
* Adding new library, changing way of displaying texts (#118)

* Adding custom icon for language button

* Adding new library, changing way of displaying texts

Added new library to make incoming translation possible to exists at the same time.

* Prepare for flipper integration

* More flipper wifi dev board work

* Add command parse

* Add set channel

* Create bins for release v0.9.6

Co-authored-by: mlodawy <105587112+mlodawy@users.noreply.github.com>
2022-05-28 09:06:59 -04:00

37 lines
760 B
C++

#include "TemperatureInterface.h"
#ifdef __cplusplus
extern "C" {
#endif
uint8_t temprature_sens_read();
#ifdef __cplusplus
}
#endif
uint8_t temprature_sens_read();
TemperatureInterface::TemperatureInterface() {
}
void TemperatureInterface::RunSetup() {
this->initTime = millis();
this->current_temp = this->getCurrentTemp();
}
uint8_t TemperatureInterface::getCurrentTemp() {
#ifndef MARAUDER_FLIPPER
return ((temprature_sens_read() - 32) / 1.8);
#endif
return 0;
}
void TemperatureInterface::main(uint32_t currentTime) {
if (currentTime != 0) {
if (currentTime - initTime >= 100) {
//Serial.println("Checking Battery Level");
this->initTime = millis();
this->current_temp = this->getCurrentTemp();
}
}
}