3 static int steffen_callback(uint8_t bb[BITBUF_ROWS][BITBUF_COLS],int16_t bits_per_row[BITBUF_ROWS]) {
5 if (bb[0][0]==0x00 && ((bb[1][0]&0x07)==0x07) && bb[1][0]==bb[2][0] && bb[2][0]==bb[3][0]) {
7 fprintf(stderr, "Remote button event:\n");
8 fprintf(stderr, "model = Steffan Switch Transmitter, %d bits\n",bits_per_row[1]);
9 fprintf(stderr, "code = %d%d%d%d%d\n", (bb[1][0]&0x80)>>7, (bb[1][0]&0x40)>>6, (bb[1][0]&0x20)>>5, (bb[1][0]&0x10)>>4, (bb[1][0]&0x08)>>3);
11 if ((bb[1][2]&0x0f)==0x0e)
12 fprintf(stderr, "button = A\n");
13 else if ((bb[1][2]&0x0f)==0x0d)
14 fprintf(stderr, "button = B\n");
15 else if ((bb[1][2]&0x0f)==0x0b)
16 fprintf(stderr, "button = C\n");
17 else if ((bb[1][2]&0x0f)==0x07)
18 fprintf(stderr, "button = D\n");
19 else if ((bb[1][2]&0x0f)==0x0f)
20 fprintf(stderr, "button = ALL\n");
22 fprintf(stderr, "button = unknown\n");
24 if ((bb[1][2]&0xf0)==0xf0) {
25 fprintf(stderr, "state = OFF\n");
27 fprintf(stderr, "state = ON\n");
31 debug_callback(bb, bits_per_row);
40 /* .name = */ "Steffen Switch Transmitter",
41 /* .modulation = */ OOK_PWM_D,
42 /* .short_limit = */ 140,
43 /* .long_limit = */ 270,
44 /* .reset_limit = */ 1500,
45 /* .json_callback = */ &steffen_callback,