Add commands LoRaWanDecoder " and LoRaWanName " to clear name (#23394)

This commit is contained in:
Theo Arends 2025-07-05 15:57:51 +02:00
parent 0a80f45636
commit 5086863322
3 changed files with 6 additions and 2 deletions

View File

@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
- NeoPool add Redox tank alarm (#19811)
- Berry f-strings now support ':' in expression (#23618)
- Universal display driver for ZJY169S0800TG01 ST7789 280x240 (#23638)
- Commands `LoRaWanDecoder "` and `LoRaWanName "` to clear name (#23394)
### Breaking Changed

View File

@ -116,6 +116,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
## Changelog v15.0.1.1
### Added
- Commands `LoRaWanDecoder "` and `LoRaWanName "` to clear name (#23394)[#23394](https://github.com/arendst/Tasmota/issues/23394)
- Universal display driver for ZJY169S0800TG01 ST7789 280x240 [#23638](https://github.com/arendst/Tasmota/issues/23638)
- NeoPool add Redox tank alarm [#19811](https://github.com/arendst/Tasmota/issues/19811)
- I2S additions [#23543](https://github.com/arendst/Tasmota/issues/23543)

View File

@ -1075,6 +1075,7 @@ void CmndLoraWanName(void) {
// LoraWanName - Show current name
// LoraWanName 1 - Set to short DevEUI (or 0x0000 if not yet joined)
// LoraWanName2 LDS02a
// LoraWanName2 " - Clear name
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= Lora->nodes)) {
uint32_t node = XdrvMailbox.index -1;
if (XdrvMailbox.data_len) {
@ -1083,7 +1084,7 @@ void CmndLoraWanName(void) {
ext_snprintf_P(name, sizeof(name), PSTR("0x%04X"), Lora->settings.end_node[node]->DevEUIl & 0x0000FFFF);
Lora->settings.end_node[node]->name = name;
} else {
Lora->settings.end_node[node]->name = XdrvMailbox.data;
Lora->settings.end_node[node]->name = ('"' == XdrvMailbox.data[0]) ? "" : XdrvMailbox.data;
}
}
ResponseCmndIdxChar(Lora->settings.end_node[node]->name.c_str());
@ -1095,10 +1096,11 @@ void CmndLoraWanDecoder(void) {
// LoraWanDecoder<1..16> <decoder name>
// LoraWanDecoder LDS02 - Set Dragino LDS02 message decoder for node 1
// LoraWanDecoder2 DW10 - Set MerryIoT DW10 message decoder for node 2
// LoraWanDecoder2 " - Clear decoder name
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= Lora->nodes)) {
uint32_t node = XdrvMailbox.index -1;
if (XdrvMailbox.data_len) {
Lora->settings.end_node[node]->decoder = XdrvMailbox.data;
Lora->settings.end_node[node]->decoder = ('"' == XdrvMailbox.data[0]) ? "" : XdrvMailbox.data;
}
ResponseCmndIdxChar(Lora->settings.end_node[node]->decoder.c_str());
}