mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
Fix Berry claiming UART0 if needed (#20324)
This commit is contained in:
parent
67b36030dc
commit
d5a4f8441b
@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
|
||||
- NeoPool hydrolysis FL1 and Redox flag (#20258)
|
||||
- Matter support for password for remote Tasmota devices (#20296)
|
||||
- Display of active drivers using command ``status 4``
|
||||
- ESP32 used UART information
|
||||
|
||||
### Breaking Changed
|
||||
- Refactoring of Berry `animate` module for WS2812 Leds (#20236)
|
||||
@ -24,6 +25,7 @@ All notable changes to this project will be documented in this file.
|
||||
- ESP32 piezo ceramic buzzer doesn't buzz (#20118)
|
||||
- Syslog server warning caused by lack of <PRI> field and hostname starting with 'z' (#14689)
|
||||
- Support for Domoticz floor/room topics. Regression from v12.0.1 (#20299)
|
||||
- Berry claiming UART0 if needed (#20324)
|
||||
|
||||
### Removed
|
||||
|
||||
|
@ -122,6 +122,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
||||
- Support for Sonoff Basic R4 Magic Switch [#20247](https://github.com/arendst/Tasmota/issues/20247)
|
||||
- Display of active drivers using command ``status 4``
|
||||
- NeoPool hydrolysis FL1 and Redox flag [#20258](https://github.com/arendst/Tasmota/issues/20258)
|
||||
- ESP32 used UART information
|
||||
- Matter support for password for remote Tasmota devices [#20296](https://github.com/arendst/Tasmota/issues/20296)
|
||||
|
||||
### Breaking Changed
|
||||
@ -135,6 +136,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
||||
- Syslog server warning caused by lack of <PRI> field and hostname starting with 'z' [#14689](https://github.com/arendst/Tasmota/issues/14689)
|
||||
- Support for Domoticz floor/room topics. Regression from v12.0.1 [#20299](https://github.com/arendst/Tasmota/issues/20299)
|
||||
- ESP32 piezo ceramic buzzer doesn't buzz [#20118](https://github.com/arendst/Tasmota/issues/20118)
|
||||
- Berry claiming UART0 if needed [#20324](https://github.com/arendst/Tasmota/issues/20324)
|
||||
- Matter Contact sensor was not triggering any update [#20232](https://github.com/arendst/Tasmota/issues/20232)
|
||||
|
||||
### Removed
|
@ -183,6 +183,12 @@ void MP3PlayerInit(void)
|
||||
// start serial communication fixed to 9600 baud
|
||||
if (MP3Player->begin(9600))
|
||||
{
|
||||
#ifdef ESP32
|
||||
if (MP3Player->hardwareSerial()) {
|
||||
ClaimSerial(); // Disable console using uart0
|
||||
}
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("MP3: Serial UART%d"), MP3Player->getUart());
|
||||
#endif // ESP32
|
||||
MP3Player->flush();
|
||||
delay(1000);
|
||||
MP3_CMD(MP3_CMD_RESET, MP3_CMD_RESET_VALUE); // reset the player to defaults
|
||||
|
@ -1248,6 +1248,9 @@ void TuyaInit(void) {
|
||||
TuyaSerial = new TasmotaSerial(Pin(GPIO_TUYA_RX), Pin(GPIO_TUYA_TX), 2);
|
||||
if (TuyaSerial->begin(baudrate)) {
|
||||
if (TuyaSerial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("TYA: Serial UART%d"), TuyaSerial->getUart());
|
||||
#endif // ESP32
|
||||
// Get MCU Configuration
|
||||
Tuya.SuspendTopic = true;
|
||||
Tuya.ignore_topic_timeout = millis() + 1000; // suppress /STAT topic for 1000ms to avoid data overflow
|
||||
|
@ -2032,6 +2032,9 @@ void TuyaInit(void) {
|
||||
TuyaSerial = new TasmotaSerial(Pin(GPIO_TUYA_RX), Pin(GPIO_TUYA_TX), 2);
|
||||
if (TuyaSerial->begin(baudrate)) {
|
||||
if (TuyaSerial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("TYA: Serial UART%d"), TuyaSerial->getUart());
|
||||
#endif // ESP32
|
||||
// Get MCU Configuration
|
||||
pTuya->SuspendTopic = true;
|
||||
pTuya->ignore_topic_timeout = millis() + 1000; // suppress /STAT topic for 1000ms to avoid data overflow
|
||||
|
@ -101,6 +101,9 @@ void ArmtronixInit(void)
|
||||
if (ArmtronixSerial->begin(115200)) {
|
||||
if (ArmtronixSerial->hardwareSerial()) { ClaimSerial(); }
|
||||
ArmtronixSerial->println("Status");
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("ARM: Serial UART%d"), ArmtronixSerial->getUart());
|
||||
#endif // ESP32
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,6 +190,9 @@ void PS16DZInit(void)
|
||||
PS16DZSerial = new TasmotaSerial(Pin(GPIO_RXD), Pin(GPIO_TXD), 2);
|
||||
if (PS16DZSerial->begin(19200)) {
|
||||
if (PS16DZSerial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("PS1: Serial UART%d"), PS16DZSerial->getUart());
|
||||
#endif // ESP32
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -303,6 +303,9 @@ void ZigbeeInitSerial(void)
|
||||
if (ZigbeeSerial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE "Serial UART%d"), ZigbeeSerial->getUart());
|
||||
#endif // ESP32
|
||||
zigbee_buffer = new SBuffer(ZIGBEE_BUFFER_SIZE);
|
||||
|
||||
zigbee.active = true;
|
||||
|
@ -415,6 +415,9 @@ void ExsInit(void)
|
||||
{
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("EXS: Serial UART%d"), ExsSerial->getUart());
|
||||
#endif // ESP32
|
||||
ExsSerial->flush();
|
||||
EsxMcuStart();
|
||||
ExsSendCmd(EXS_CH_LOCK, 0);
|
||||
|
@ -156,7 +156,7 @@ void TCPInit(void) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_TCP "using hardserial %d"), TCPSerial->getUart());
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_TCP "Serial UART%d"), TCPSerial->getUart());
|
||||
#endif
|
||||
} else {
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_TCP "failed init serial"));
|
||||
|
@ -1084,6 +1084,9 @@ miel_hvac_pre_init(void)
|
||||
ClaimSerial();
|
||||
SetSerial(baudrate, TS_SERIAL_8E1);
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR(MIEL_HVAC_LOGNAME ": Serial UART%d"), sc->sc_serial->getUart());
|
||||
#endif
|
||||
|
||||
sc->sc_device = TasmotaGlobal.devices_present;
|
||||
UpdateDevicesPresent(1); /* claim a POWER device slot */
|
||||
|
@ -664,6 +664,10 @@ void ShdInit(void)
|
||||
if (ShdSerial->hardwareSerial())
|
||||
ClaimSerial();
|
||||
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR(SHD_LOGNAME "Serial UART%d"), ShdSerial->getUart());
|
||||
#endif
|
||||
|
||||
ShdSerial->flush();
|
||||
|
||||
ShdResetToAppMode();
|
||||
|
@ -56,6 +56,11 @@ extern "C" {
|
||||
if (!ok) {
|
||||
delete ser;
|
||||
be_raise(vm, "internal_error", "Unable to start serial");
|
||||
} else {
|
||||
if (ser->hardwareSerial()) {
|
||||
ClaimSerial(); // Disable console using uart0
|
||||
}
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("BRY: Serial UART%d"), ser->getUart());
|
||||
}
|
||||
be_pushcomptr(vm, (void*) ser);
|
||||
be_setmember(vm, 1, ".p");
|
||||
|
@ -122,6 +122,9 @@ projector_ctrl_pre_init(void)
|
||||
ClaimSerial();
|
||||
SetSerial(baudrate, TS_SERIAL_8N1);
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR(PROJECTOR_CTRL_LOGNAME ": Serial UART%d"), sc->sc_serial->getUart());
|
||||
#endif
|
||||
|
||||
UpdateDevicesPresent(1); /* claim a POWER device slot */
|
||||
sc->sc_device = TasmotaGlobal.devices_present;
|
||||
|
@ -207,6 +207,9 @@ bool ModbusBridgeBegin(void) {
|
||||
if (2 == result) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("MBS: Serial UART%d"), modbusBridgeModbus->getUart());
|
||||
#endif
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("MBS: MBR %s ser init at %d baud"), (2 == result ? "HW" : "SW"), Settings->modbus_sbaudrate * 300);
|
||||
|
||||
if (nullptr == modbusBridge.buffer) {
|
||||
|
@ -996,6 +996,10 @@ tuyamcubr_pre_init(void)
|
||||
if (sc->sc_serial->hardwareSerial())
|
||||
ClaimSerial();
|
||||
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR(TUYAMCUBR_LOGNAME ": Serial UART%d"), sc->sc_serial->getUart());
|
||||
#endif
|
||||
|
||||
/* commit */
|
||||
tuyamcubr_sc = sc;
|
||||
|
||||
|
@ -1917,6 +1917,11 @@ void SSPMInit(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SspmSerial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("SPM: Serial UART%d"), SspmSerial->getUart());
|
||||
|
||||
Xdrv86SettingsLoad(0);
|
||||
|
||||
pinMode(SSPM_GPIO_ARM_RESET, OUTPUT);
|
||||
|
@ -232,6 +232,9 @@ void CseSnsInit(void) {
|
||||
SetSerial(4800, TS_SERIAL_8E1);
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("CSE: Serial UART%d"), CseSerial->getUart());
|
||||
#endif
|
||||
if (0 == Settings->param[P_CSE7766_INVALID_POWER]) {
|
||||
Settings->param[P_CSE7766_INVALID_POWER] = CSE_MAX_INVALID_POWER; // SetOption39 1..255
|
||||
}
|
||||
|
@ -246,6 +246,9 @@ void PzemSnsInit(void)
|
||||
if (PzemSerial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("PZM: Serial UART%d"), PzemSerial->getUart());
|
||||
#endif
|
||||
Energy->phase_count = ENERGY_MAX_PHASES; // Start off with three phases
|
||||
Pzem.phase = 0;
|
||||
Pzem.read_state = 1;
|
||||
|
@ -572,6 +572,9 @@ void McpSnsInit(void)
|
||||
} else {
|
||||
mcp_buffer = (char*)(malloc(MCP_BUFFER_SIZE));
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("MCP: Serial UART%d"), McpSerial->getUart());
|
||||
#endif
|
||||
DigitalWrite(GPIO_MCP39F5_RST, 0, 1); // MCP enable
|
||||
Energy->use_overtemp = true; // Use global temperature for overtemp detection
|
||||
} else {
|
||||
|
@ -470,6 +470,9 @@ void solaxX1_SnsInit(void)
|
||||
solaxX1Serial = new TasmotaSerial(Pin(GPIO_SOLAXX1_RX), Pin(GPIO_SOLAXX1_TX), 1);
|
||||
if (solaxX1Serial->begin(SOLAXX1_SPEED)) {
|
||||
if (solaxX1Serial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("SX1: Serial UART%d"), solaxX1Serial->getUart());
|
||||
#endif
|
||||
} else {
|
||||
TasmotaGlobal.energy_driver = ENERGY_NONE;
|
||||
}
|
||||
|
@ -307,6 +307,9 @@ void Bl09XXInit(void) {
|
||||
if (Bl09XXSerial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("BL9: Serial UART%d"), Bl09XXSerial->getUart());
|
||||
#endif
|
||||
if (HLW_UREF_PULSE == EnergyGetCalibration(ENERGY_VOLTAGE_CALIBRATION)) {
|
||||
for (uint32_t i = 0; i < 2; i++) {
|
||||
EnergySetCalibration(ENERGY_POWER_CALIBRATION, bl09xx_pref[Bl09XX.model], i);
|
||||
|
@ -583,6 +583,9 @@ void Cse7761SnsInit(void) {
|
||||
SetSerial(38400, TS_SERIAL_8E1);
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("C61: Serial UART%d"), Cse7761Serial->getUart());
|
||||
#endif
|
||||
|
||||
#ifdef CSE7761_FREQUENCY
|
||||
#ifdef CSE7761_ZEROCROSS
|
||||
|
@ -238,6 +238,9 @@ void Bl6523Init(void)
|
||||
{
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("BL6: Serial UART%d and UART%d"), Bl6523RxSerial->getUart(), Bl6523TxSerial->getUart());
|
||||
#endif
|
||||
Bl6523.type = 1;
|
||||
Energy->phase_count = 1;
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("BL6:Init Success" ));
|
||||
|
@ -407,6 +407,9 @@ void Ld2410Detect(void) {
|
||||
LD2410Serial = new TasmotaSerial(Pin(GPIO_LD2410_RX), Pin(GPIO_LD2410_TX), 2);
|
||||
if (LD2410Serial->begin(256000)) {
|
||||
if (LD2410Serial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("LD2: Serial UART%d"), LD2410Serial->getUart());
|
||||
#endif
|
||||
|
||||
LD2410.retry = 4;
|
||||
LD2410.step = 12;
|
||||
|
@ -65,6 +65,9 @@ void LOXInit()
|
||||
if (LOXSerial->hardwareSerial())
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("LOX: Serial UART%d"), LOXSerial->getUart());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -265,6 +265,9 @@ void Gm861Init(void) {
|
||||
if (Gm861Serial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("GM8: Serial UART%d"), Gm861Serial->getUart());
|
||||
#endif
|
||||
Gm861->barcode[0] = '0'; // No barcode yet
|
||||
Gm861->state = GM861_STATE_INIT_OFFSET;
|
||||
}
|
||||
|
@ -86,6 +86,9 @@ void Hc8Init(void)
|
||||
Hc8Serial = new TasmotaSerial(Pin(GPIO_HC8_RXD), -1, 1);
|
||||
if (Hc8Serial->begin(9600)) {
|
||||
if (Hc8Serial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("HC8: Serial UART%d"), Hc8Serial->getUart());
|
||||
#endif
|
||||
Hc8Initialized = true;
|
||||
}
|
||||
}
|
||||
|
@ -329,9 +329,11 @@ void MhzInit(void)
|
||||
MhzSerial = new TasmotaSerial(Pin(GPIO_MHZ_RXD), Pin(GPIO_MHZ_TXD), 1);
|
||||
if (MhzSerial->begin(9600)) {
|
||||
if (MhzSerial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("MHZ: Serial UART%d"), MhzSerial->getUart());
|
||||
#endif
|
||||
mhz_type = 1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -332,6 +332,9 @@ void PmsInit(void) {
|
||||
PmsSerial = new TasmotaSerial(Pin(GPIO_PMS5003_RX), (PinUsed(GPIO_PMS5003_TX)) ? Pin(GPIO_PMS5003_TX) : -1, 1);
|
||||
if (PmsSerial->begin(9600)) {
|
||||
if (PmsSerial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("PMS: Serial UART%d"), PmsSerial->getUart());
|
||||
#endif
|
||||
|
||||
if (!PinUsed(GPIO_PMS5003_TX)) { // setting interval not supported if TX pin not connected
|
||||
Settings->pms_wake_interval = 0;
|
||||
@ -345,7 +348,6 @@ void PmsInit(void) {
|
||||
Pms.time = Settings->pms_wake_interval - WARMUP_PERIOD; // Let it wake up in the next second
|
||||
}
|
||||
}
|
||||
|
||||
Pms.type = 1;
|
||||
}
|
||||
}
|
||||
|
@ -208,6 +208,9 @@ void NovaSdsInit(void)
|
||||
if (NovaSdsSerial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("SDS: Serial UART%d"), NovaSdsSerial->getUart());
|
||||
#endif
|
||||
novasds_type = 1;
|
||||
NovaSdsSetWorkPeriod();
|
||||
}
|
||||
|
@ -146,6 +146,9 @@ void Sr04TModeDetect(void) {
|
||||
if (sonar_serial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("SR4: Serial UART%d"), sonar_serial->getUart());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,6 +211,9 @@ void me007_init( void )
|
||||
{
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR(ME007_DEBUG_MSG_TAG "Serial UART%d"), gp_serial_if->getUart());
|
||||
#endif
|
||||
|
||||
pinMode( me007_data_s.pin_trig_u8, OUTPUT ); /**< @details Configure trigger pin as output */
|
||||
digitalWrite( me007_data_s.pin_trig_u8, HIGH ); /**< @details Set trigger pin to high-level as it ME007 requires a falling edge to initiate measurement */
|
||||
|
@ -271,6 +271,9 @@ void AzInit(void)
|
||||
AzSerial = new TasmotaSerial(Pin(GPIO_AZ_RXD), Pin(GPIO_AZ_TXD), 1);
|
||||
if (AzSerial->begin(9600)) {
|
||||
if (AzSerial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("AZ7: Serial UART%d"), AzSerial->getUart());
|
||||
#endif
|
||||
az_type = 1;
|
||||
}
|
||||
}
|
||||
|
@ -97,6 +97,9 @@ void PN532_Init(void) {
|
||||
PN532_Serial = new TasmotaSerial(Pin(GPIO_PN532_RXD), Pin(GPIO_PN532_TXD), 1);
|
||||
if (PN532_Serial->begin(115200)) {
|
||||
if (PN532_Serial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("NFC: Serial UART%d"), PN532_Serial->getUart());
|
||||
#endif
|
||||
PN532_wakeup();
|
||||
uint32_t ver = PN532_getFirmwareVersion();
|
||||
if (ver) {
|
||||
|
@ -70,6 +70,9 @@ void RDM6300Init() {
|
||||
if (RDM6300Serial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("RDM: Serial UART%d"), RDM6300Serial->getUart());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -326,6 +326,9 @@ void IBEACON_Init() {
|
||||
if (IBEACON_Serial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("BLE: Serial UART%d"), IBEACON_Serial->getUart());
|
||||
#endif
|
||||
hm17_sendcmd(HM17_TEST);
|
||||
hm17_lastms=millis();
|
||||
// in case of using Settings this has to be moved
|
||||
|
@ -71,6 +71,9 @@ void HpmaInit(void)
|
||||
if (HpmaSerial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("HPM: Serial UART%d"), HpmaSerial->getUart());
|
||||
#endif
|
||||
hpma_type = 1;
|
||||
hpma115S0->Init();
|
||||
hpma115S0->StartParticleMeasurement();
|
||||
|
@ -383,6 +383,9 @@ void UBXDetect(void)
|
||||
ClaimSerial();
|
||||
DEBUG_SENSOR_LOG(PSTR("UBX: claim HW"));
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("UBX: Serial UART%d"), UBXSerial->getUart());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -698,6 +698,9 @@ void HM10SerialInit(void) {
|
||||
ClaimSerial();
|
||||
DEBUG_SENSOR_LOG(PSTR("%s: claim HW"),D_CMND_HM10);
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("HM1: Serial UART%d"), HM10Serial->getUart());
|
||||
#endif
|
||||
HM10_Reset();
|
||||
HM10.mode.pending_task = 1;
|
||||
HM10.mode.init = 1;
|
||||
|
@ -43,6 +43,9 @@ void HRXLInit(void) {
|
||||
if (HRXLSerial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("HRX: Serial UART%d"), HRXLSerial->getUart());
|
||||
#endif
|
||||
HRXLSerial->setTimeout(HRXL_READ_TIMEOUT);
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,9 @@ void DYPInit(void) {
|
||||
if (DYPSerial->hardwareSerial()) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("DYP: Serial UART%d"), DYPSerial->getUart());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,6 +116,9 @@ void As608Init(void) {
|
||||
|
||||
As608Finger->begin(57600);
|
||||
if (As608Serial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("AS6: Serial UART%d"), As608Serial->getUart());
|
||||
#endif
|
||||
|
||||
if (As608Finger->verifyPassword()) {
|
||||
As608Finger->getTemplateCount();
|
||||
|
@ -97,6 +97,9 @@ void TfmpInit(void)
|
||||
{
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("TFM: Serial UART%d"), TfmpSerial->getUart());
|
||||
#endif
|
||||
tfminiplus_sensor.ready = true;
|
||||
TfmpSerial->flush();
|
||||
}
|
||||
|
@ -159,6 +159,9 @@ void Rg15Init(void) {
|
||||
if (HydreonSerial) {
|
||||
if (HydreonSerial->begin(RG15_BAUDRATE)) {
|
||||
if (HydreonSerial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("HRG: Serial UART%d"), HydreonSerial->getUart());
|
||||
#endif
|
||||
Rg15.init_step = 5; // Perform RG-15 init
|
||||
}
|
||||
}
|
||||
|
@ -114,6 +114,9 @@ void VindriktningInit(void) {
|
||||
VindriktningSerial = new TasmotaSerial(Pin(GPIO_VINDRIKTNING_RX), -1, 1);
|
||||
if (VindriktningSerial->begin(9600)) {
|
||||
if (VindriktningSerial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("VDN: Serial UART%d"), VindriktningSerial->getUart());
|
||||
#endif
|
||||
Vindriktning.type = 1;
|
||||
}
|
||||
}
|
||||
|
@ -394,6 +394,9 @@ void CM11Init(void)
|
||||
CM11Serial = new TasmotaSerial(Pin(GPIO_CM11_RXD), Pin(GPIO_CM11_TXD), 1);
|
||||
if (CM11Serial->begin(9600)) {
|
||||
if (CM11Serial->hardwareSerial()) { ClaimSerial(); }
|
||||
#ifdef ESP32
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("CM1: Serial UART%d"), CM11Serial->getUart());
|
||||
#endif
|
||||
cm11_type = 1;
|
||||
CM11SendCmd(CM11_CMND_SW_VERSION);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user