X-Git-Url: https://git.rvb.name/rtl-433.git/blobdiff_plain/ca13278b24eb61443559bcb61e64627fba3d8823..6d15c6f967221af825cf84e3ed12b96c763b127b:/src/devices/leak.c diff --git a/src/devices/leak.c b/src/devices/leak.c deleted file mode 100644 index e656be0..0000000 --- a/src/devices/leak.c +++ /dev/null @@ -1,52 +0,0 @@ -#include "rtl_433.h" - -int leak_callback(uint8_t bb[BITBUF_ROWS][BITBUF_COLS], int16_t bits_per_row[BITBUF_ROWS]) { - int i,j,k; - int rows_used[BITBUF_ROWS]; - int col_max = 0; - int row_cnt = 0; - - // determine what part of bb[][] has non-zero data to avoid - // outputting lots of empty rows - for (i=0 ; i 0 ; j--) { - if (bb[i][j] != 0) - break; - } - if (j != 0) { - rows_used[i] = 1; - row_cnt++; - if (j > col_max) - col_max = j; - } else { - rows_used[i] = 0; - } - } - - if (row_cnt != 1) { - return 0; - } - - if (col_max !=3) { - return 0; - } - - if ((bb[0][0] == 0x76) || (bb[0][0] == 0x77)) { - - fprintf(stdout,"ALARM:TYPE=LEAK,ID=%2X%2X%2X%2X\n",bb[0][0],bb[0][1],bb[0][2],bb[0][3]); - - } - - return 1; - -} - -r_device leak = { - /* .id = */ 20, - /* .name = */ "Leak sensor", - /* .modulation = */ OOK_MANCHESTER, - /* .short_limit = */ 150, - /* .long_limit = */ 0, - /* .reset_limit = */ 1000, - /* .json_callback = */ &leak_callback, -};