3 static int steffen_callback(bitbuffer_t *bitbuffer) {
4 bitrow_t *bb = bitbuffer->bb;
6 if (bb[0][0]==0x00 && ((bb[1][0]&0x07)==0x07) && bb[1][0]==bb[2][0] && bb[2][0]==bb[3][0]) {
8 fprintf(stdout, "Remote button event:\n");
9 fprintf(stdout, "model = Steffan Switch Transmitter, %d bits\n",bitbuffer->bits_per_row[1]);
10 fprintf(stdout, "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);
12 if ((bb[1][2]&0x0f)==0x0e)
13 fprintf(stdout, "button = A\n");
14 else if ((bb[1][2]&0x0f)==0x0d)
15 fprintf(stdout, "button = B\n");
16 else if ((bb[1][2]&0x0f)==0x0b)
17 fprintf(stdout, "button = C\n");
18 else if ((bb[1][2]&0x0f)==0x07)
19 fprintf(stdout, "button = D\n");
20 else if ((bb[1][2]&0x0f)==0x0f)
21 fprintf(stdout, "button = ALL\n");
23 fprintf(stdout, "button = unknown\n");
25 if ((bb[1][2]&0xf0)==0xf0) {
26 fprintf(stdout, "state = OFF\n");
28 fprintf(stdout, "state = ON\n");
37 .name = "Steffen Switch Transmitter",
38 .modulation = OOK_PULSE_PPM_RAW,
42 .json_callback = &steffen_callback,