mirror of
https://github.com/merbanan/rtl_433.git
synced 2026-04-23 11:07:09 -04:00
Merge pull request #286 from dwmw2/master
Return correct events count from oil_watchman and emontx drivers
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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[] = {
|
||||
|
||||
Reference in New Issue
Block a user