mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-10 23:00:58 -08:00
* 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>
37 lines
760 B
C++
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();
|
|
}
|
|
}
|
|
}
|