add gpio output for bluetooth communication active

This commit is contained in:
technyon
2025-10-06 17:51:00 +07:00
parent e05ff0fdd0
commit 0e1caf6211
8 changed files with 27 additions and 22 deletions

View File

@@ -46,9 +46,6 @@ NukiOpenerWrapper::NukiOpenerWrapper(const std::string& deviceName, NukiDeviceId
network->setAuthCommandReceivedCallback(nukiOpenerInst->onAuthCommandReceivedCallback);
_gpio->addCallback(NukiOpenerWrapper::gpioActionCallback);
#ifndef NUKI_HUB_UPDATER
_pinsCommError = _gpio->getPinsWithRole(PinRole::OutputHighBluetoothCommError);
#endif
}
@@ -76,7 +73,7 @@ void NukiOpenerWrapper::initialize()
_hassEnabled = _preferences->getBool(preference_mqtt_hass_enabled, false);
readSettings();
#ifndef NUKI_HUB_UPDATER
_nukiRetryHandler = new NukiRetryHandler("Opener", _gpio, _gpio->getPinsWithRole(PinRole::OutputHighBluetoothCommError), _nrOfRetries, _retryDelay);
_nukiRetryHandler = new NukiRetryHandler("Opener", _gpio, _gpio->getPinsWithRole(PinRole::OutputHighBluetoothComm), _gpio->getPinsWithRole(PinRole::OutputHighBluetoothCommError), _nrOfRetries, _retryDelay);
#endif
}
@@ -3658,14 +3655,6 @@ const std::string NukiOpenerWrapper::hardwareVersion() const
return _hardwareVersion;
}
void NukiOpenerWrapper::setCommErrorPins(const uint8_t& value)
{
for (uint8_t pin : _pinsCommError)
{
_gpio->setPinOutput(pin, value);
}
}
void NukiOpenerWrapper::disableWatchdog()
{
_restartBeaconTimeout = -1;