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--) {
26 fprintf(stderr,"Rows=%d,Cols=%d",row_cnt,col_max);
36 if ((bb[0][0] == 0x76) || (bb[0][0] == 0x77)) {
38 fprintf(stdout,"ALARM:TYPE=LEAK,ID=%2X%2X%2X%2X\n",bb[0][0],bb[0][1],bb[0][2],bb[0][3]);
48 /* .name = */ "Leak sensor",
49 /* .modulation = */ OOK_MANCHESTER,
50 /* .short_limit = */ 150,
51 /* .long_limit = */ 0,
52 /* .reset_limit = */ 1000,
53 /* .json_callback = */ &leak_callback,