mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fix gpio for core voltage detect
This commit is contained in:
@@ -25,7 +25,7 @@ uuid::log::Logger AnalogSensor::logger_{F_(analogsensor), uuid::log::Facility::D
|
|||||||
|
|
||||||
void AnalogSensor::start(const bool factory_settings) {
|
void AnalogSensor::start(const bool factory_settings) {
|
||||||
// if (factory_settings && EMSESP::nvs_.getString("boot").equals("E32V3") && EMSESP::nvs_.getString("hwrevision").equals("3.0")) {
|
// if (factory_settings && EMSESP::nvs_.getString("boot").equals("E32V3") && EMSESP::nvs_.getString("hwrevision").equals("3.0")) {
|
||||||
if (factory_settings && analogReadMilliVolts(35) > 800) { // core voltage > 3V
|
if (factory_settings && analogReadMilliVolts(39) > 800) { // core voltage > 3V
|
||||||
EMSESP::webCustomizationService.update([&](WebCustomization & settings) {
|
EMSESP::webCustomizationService.update([&](WebCustomization & settings) {
|
||||||
auto newSensor = AnalogCustomization();
|
auto newSensor = AnalogCustomization();
|
||||||
newSensor.gpio = 39;
|
newSensor.gpio = 39;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ uuid::log::Logger TemperatureSensor::logger_{F_(temperaturesensor), uuid::log::F
|
|||||||
// start the 1-wire
|
// start the 1-wire
|
||||||
void TemperatureSensor::start(const bool factory_settings) {
|
void TemperatureSensor::start(const bool factory_settings) {
|
||||||
// set_internal_ = factory_settings && EMSESP::nvs_.getString("boot").equals("E32V3") && EMSESP::nvs_.getString("hwrevision").equals("3.0");
|
// set_internal_ = factory_settings && EMSESP::nvs_.getString("boot").equals("E32V3") && EMSESP::nvs_.getString("hwrevision").equals("3.0");
|
||||||
set_internal_ = factory_settings && analogReadMilliVolts(35) > 800; // core voltage > 3V
|
set_internal_ = factory_settings && analogReadMilliVolts(39) > 800; // core voltage > 3V
|
||||||
reload();
|
reload();
|
||||||
|
|
||||||
if (!dallas_gpio_) {
|
if (!dallas_gpio_) {
|
||||||
|
|||||||
Reference in New Issue
Block a user