fix gpio for core voltage detect

This commit is contained in:
MichaelDvP
2025-07-23 20:39:24 +02:00
parent c8033692b1
commit c27134f185
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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_) {