mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 06:47:17 +00:00
SDS0X1 RX TX pin handling in NovaSdsInit
This commit is contained in:
parent
91b07f2943
commit
c41a092c7d
@ -83,12 +83,14 @@ void NovaSdsSecond() // Every second
|
||||
void NovaSdsInit()
|
||||
{
|
||||
novasds_type = 0;
|
||||
if (pin[GPIO_SDS0X1] < 99) {
|
||||
NovaSdsSerial = new TasmotaSerial(pin[GPIO_SDS0X1], -1, 1);
|
||||
if (pin[GPIO_SDS0X1_RX] < 99 && pin[GPIO_SDS0X1_TX] < 99) {
|
||||
NovaSdsSerial = new TasmotaSerial(pin[GPIO_SDS0X1_RX], pin[GPIO_SDS0X1_TX], 1);
|
||||
|
||||
if (NovaSdsSerial->begin(9600)) {
|
||||
if (NovaSdsSerial->hardwareSerial()) { ClaimSerial(); }
|
||||
if (NovaSdsSerial->hardwareSerial()) ClaimSerial();
|
||||
novasds_type = 1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -154,4 +156,4 @@ boolean Xsns20(byte function)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // USE_NOVA_SDS
|
||||
#endif // USE_NOVA_SDS
|
||||
|
Loading…
x
Reference in New Issue
Block a user