Skip to content

Commit

Permalink
Merge branch 'main' into refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
NorthernMan54 committed Nov 29, 2024
2 parents 9ec8e42 + 3fdcdd6 commit 4f0b82d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ DEVICE_DEBUG ; Validate fields are mapped to response object ( rtl_433
MEMORY_DEBUG ; display heap usage information
RESOURCE_DEBUG : Monitor HEAP and STACK usage and report large jumps
MY_DEVICES ; Only include my personal subset of devices
NO_DEAF_WORKAROUND ; Workaround for issue #16 ( by default the workaround is enabaled )
NO_DEAF_WORKAROUND ; Workaround for issue #16 ( by default the workaround is enabled )
PUBLISH_UNPARSED ; Enable publishing of MQTT messages for unparsed signals, e.g. {model":"unknown","protocol":"signal parsing failed"…
RAW_SIGNAL_DEBUG ; display raw received messages
RSSI_SAMPLES ; Number of rssi samples to collect for average calculation, defaults to 50,000
Expand Down
13 changes: 7 additions & 6 deletions example/OOK_Receiver/OOK_Receiver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@ rtl_433_ESP rf; // use -1 to disable transmitter
int count = 0;

void rtl_433_Callback(char* message) {
DynamicJsonBuffer jsonBuffer2(JSON_MSG_BUFFER);
JsonObject& RFrtl_433_ESPdata = jsonBuffer2.parseObject(message);
logJson(RFrtl_433_ESPdata);
JsonDocument jsonDocument;
deserializeJson(jsonDocument,message);
logJson(jsonDocument);
count++;
}

void logJson(JsonObject& jsondata) {
void logJson(JsonDocument jsondata) {
#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
char JSONmessageBuffer[jsondata.measureLength() + 1];
char JSONmessageBuffer[measureJson(jsondata) + 1];
serializeJson(jsondata, JSONmessageBuffer, measureJson(jsondata) + 1);
#else
char JSONmessageBuffer[JSON_MSG_BUFFER];
serializeJson(jsondata, JSONmessageBuffer, JSON_MSG_BUFFER);
#endif
jsondata.printTo(JSONmessageBuffer, sizeof(JSONmessageBuffer));
#if defined(setBitrate) || defined(setFreqDev) || defined(setRxBW)
Log.setShowLevel(false);
Log.notice(F("."));
Expand Down
6 changes: 5 additions & 1 deletion example/OOK_Receiver/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ boards_dir = boards

[libraries]
arduinolog = https://github.com/1technophile/Arduino-Log.git#d13cd80
arduinojson = [email protected]
arduinojson =
ArduinoJson
; ArduinoJson @ 7.0.4
; ArduinoJson @ 6.21.5
; ArduinoJson @ 5.13.4 ; deprecated
rtl_433_ESP = symlink://../../../rtl_433_ESP ; Builds library from source directory

[env]
Expand Down

0 comments on commit 4f0b82d

Please sign in to comment.