Minor RTL_433 Tuning (#960)
* Update to SmartRC-CC1101-Driver-Lib@^2.5.4 and removal of workaround from #847 Tks to @LSatan workaround no longer needed https://github.com/LSatan/SmartRC-CC1101-Driver-Lib/issues/65 * Default to value as subject for rtl_433 and receiver switching * Default to not publishing unparsed signals * Fix for missing String for uint64_t * Fix is only required when value a subject is defined and not PiLight Co-authored-by: Northern Man <sgracey@Heisenberg.local>
This commit is contained in:
1 parent
18c8524ae0
commit
33fa1ca759
3 files changed
+40
-4
No files matched your search
+30
-1
@@ -298,7 +298,7 @@ void pub(const char* topicori, JsonObject& data) {
|
||||
# else
|
||||
SIGNAL_SIZE_UL_ULL value = data["value"];
|
||||
if (value != 0) {
|
||||
topic = topic + "/" + String(value);
|
||||
topic = topic + "/" + toString(value);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
@@ -1783,3 +1783,32 @@ void MQTTtoSYS(char* topicOri, JsonObject& SYSdata) { // json object decoding
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(valueAsASubject) && !defined(ZgatewayPilight)
|
||||
# if defined(ESP32) || defined(ESP8266) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
||||
String toString(uint64_t input) {
|
||||
String result = "";
|
||||
uint8_t base = 10;
|
||||
|
||||
do {
|
||||
char c = input % base;
|
||||
input /= base;
|
||||
|
||||
if (c < 10)
|
||||
c += '0';
|
||||
else
|
||||
c += 'A' - 10;
|
||||
result = c + result;
|
||||
} while (input);
|
||||
return result;
|
||||
}
|
||||
|
||||
# else
|
||||
|
||||
String toString(uint32_t input) {
|
||||
String result = String(input);
|
||||
|
||||
return result;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
Reference in new issue
Block a user