3 int leak_callback(uint8_t bb[BITBUF_ROWS][BITBUF_COLS], int16_t bits_per_row[BITBUF_ROWS]) {
5 int rows_used[BITBUF_ROWS];
9 // determine what part of bb[][] has non-zero data to avoid
10 // outputting lots of empty rows
11 for (i=0 ; i<BITBUF_ROWS ; i++) {
12 for (j=BITBUF_COLS - 1 ; j > 0 ; j--) {
34 if ((bb[0][0] == 0x76) || (bb[0][0] == 0x77)) {
36 fprintf(stdout,"ALARM:TYPE=LEAK,ID=%2X%2X%2X%2X\n",bb[0][0],bb[0][1],bb[0][2],bb[0][3]);
46 /* .name = */ "Leak sensor",
47 /* .modulation = */ OOK_MANCHESTER,
48 /* .short_limit = */ 150,
49 /* .long_limit = */ 0,
50 /* .reset_limit = */ 1000,
51 /* .json_callback = */ &leak_callback,