diff --git a/src/devices/emontx.c b/src/devices/emontx.c index 3a090ab4..cf04c3b2 100644 --- a/src/devices/emontx.c +++ b/src/devices/emontx.c @@ -39,6 +39,7 @@ static int emontx_callback(bitbuffer_t *bitbuffer) { bitrow_t *bb = bitbuffer->bb; unsigned bitpos = 0; unsigned bits = bitbuffer->bits_per_row[0]; + int events = 0; // Search for only 22 bits to cope with inverted frames and // the missing final preamble bit with RFM69 transmissions. @@ -125,8 +126,9 @@ static int emontx_callback(bitbuffer_t *bitbuffer) { words[10] == 3000 ? NULL : "temp6_C", "", DATA_FORMAT, "%.1f", DATA_DOUBLE, (double)words[10] / 10.0, NULL); data_acquired_handler(data); + events++; } - return 0; + return events; } static char *output_fields[] = { @@ -136,7 +138,7 @@ static char *output_fields[] = { }; r_device emontx = { - .name = "emonTx OpenEnergyMonitor (stub driver)", + .name = "emonTx OpenEnergyMonitor", .modulation = FSK_PULSE_PCM, .short_limit = 2000000.0 / (49230 + 49261), // 49261kHz for RFM69, 49230kHz for RFM12B .long_limit = 2000000.0 / (49230 + 49261), diff --git a/src/devices/oil_watchman.c b/src/devices/oil_watchman.c index e6913cff..c87f3f11 100644 --- a/src/devices/oil_watchman.c +++ b/src/devices/oil_watchman.c @@ -33,6 +33,7 @@ static int oil_watchman_callback(bitbuffer_t *bitbuffer) { data_t *data; unsigned bitpos = 0; bitbuffer_t databits = {0}; + int events = 0; local_time_str(0, time_str); @@ -91,8 +92,9 @@ static int oil_watchman_callback(bitbuffer_t *bitbuffer) { "depth", "", DATA_INT, depth, NULL); data_acquired_handler(data); + events++; } - return 0; + return events; }; static char *output_fields[] = {