Obsolete files removed
[rtl-433.git] / src / devices / intertechno.c
1 #include "rtl_433.h"
2
3 static int intertechno_callback(uint8_t bb[BITBUF_ROWS][BITBUF_COLS], int16_t bits_per_row[BITBUF_ROWS]) {
4
5       //if (bb[1][1] == 0 && bb[1][0] != 0 && bb[1][3]==bb[2][3]){
6       if(bb[0][0]==0 && bb[0][0] == 0 && bb[1][0] == 0x56){
7         fprintf(stdout, "SWITCH:TYPE=INTERTECHNO,");
8         fprintf(stdout, "rid0=%x,",bb[1][0]);
9         fprintf(stdout, "rid1=%x,",bb[1][1]);
10         fprintf(stdout, "rid2=%x,",bb[1][2]);
11         fprintf(stdout, "rid3=%x,",bb[1][3]);
12         fprintf(stdout, "rid4=%x,",bb[1][4]);
13         fprintf(stdout, "rid5=%x,",bb[1][5]);
14         fprintf(stdout, "rid6=%x,",bb[1][6]);
15         fprintf(stdout, "rid7=%x,",bb[1][7]);
16         fprintf(stdout, "SLAVE=%i,",bb[1][7] & 0b00001111);
17         fprintf(stdout, "MASTER=%i,",(bb[1][7] & 0b11110000) >> 4);
18         fprintf(stdout, "COMMAND=%i\n",(bb[1][6] & 0b00000111));
19         fprintf(stdout, "%02x %02x %02x %02x %02x\n",bb[1][0],bb[1][1],bb[1][2],bb[1][3],bb[1][4]);
20
21         if (debug_output)
22             debug_callback(bb, bits_per_row);
23
24         return 1;
25     }
26     return 0;
27 }
28
29 r_device intertechno = {
30     /* .id             = */ 14,
31     /* .name           = */ "Intertechno 433",
32     /* .modulation     = */ OOK_PWM_D,
33     /* .short_limit    = */ 100,
34     /* .long_limit     = */ 350,
35     /* .reset_limit    = */ 3000,
36     /* .json_callback  = */ &intertechno_callback,
37     /* .json_callback  = */ //&debug_callback,
38 };