Skip to content

Commit c90ea35

Browse files
committed
Fixes for OOK Reception
@diepeterpan We needed to back these out to resolve user issues with the changes introduced in release 0.1.7 / #60
1 parent 353b500 commit c90ea35

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/rtl_433/pulse_slicer.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ int pulse_slicer_pcm(pulse_data_t const* pulses, r_device* device) {
8787

8888
int const gap_limit = s_gap ? s_gap : s_reset;
8989
int const max_zeros = gap_limit / s_long;
90-
if (s_tolerance <= 0)
91-
s_tolerance = s_long / 4; // default tolerance is +-25% of a bit period
9290

9391
// if there is a run of bit-wide toggles (preamble) tune the bit period
9492
int min_count = s_short == s_long ? 12 : 4;
@@ -319,8 +317,8 @@ int pulse_slicer_pwm(pulse_data_t const* pulses, r_device* device) {
319317
int s_sync = device->sync_width * samples_per_us;
320318
int s_tolerance = device->tolerance * samples_per_us;
321319

322-
if (s_tolerance <= 0) // From https://github.com/NorthernMan54/rtl_433_ESP/pull/65
323-
s_tolerance = s_long / 4; // default tolerance is +-25% of a bit period
320+
// if (s_tolerance <= 0) // From https://github.com/NorthernMan54/rtl_433_ESP/pull/65
321+
// s_tolerance = s_long / 4; // default tolerance is +-25% of a bit period
324322

325323
// check for rounding to zero
326324
if ((device->short_width > 0 && s_short <= 0) || (device->long_width > 0 && s_long <= 0) || (device->reset_limit > 0 && s_reset <= 0) || (device->gap_limit > 0 && s_gap <= 0) || (device->sync_width > 0 && s_sync <= 0) || (device->tolerance > 0 && s_tolerance <= 0)) {

src/rtl_433_ESP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ void rtl_433_ESP::initReceiver(byte inputPin, float receiveFrequency) {
247247
state = radio.setBitRate(1.2);
248248
RADIOLIB_STATE(state, "setBitRate");
249249

250-
state = radio.setRxBandwidth(50); // Lowering to 125 lowered number of received signals
250+
state = radio.setRxBandwidth(250); // Lowering to 125 lowered number of received signals
251251
RADIOLIB_STATE(state, "setRxBandwidth");
252252

253253
} else {

src/signalDecoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ void rtl_433_DecoderTask(void* pvParameters) {
512512
data_t* data;
513513
/* clang-format off */
514514
data = data_make(
515-
"model", "", DATA_STRING, "unknown",
515+
"model", "", DATA_STRING, "undecoded signal",
516516
"protocol", "", DATA_STRING, "signal parsing failed",
517517
"duration", "", DATA_INT, rtl_pulses->signalDuration,
518518
"rssi", "", DATA_INT, rtl_pulses->signalRssi,

0 commit comments

Comments
 (0)