4 * Stub for decoding test data only
6 * Copyright (C) 2015 Tommy Vestermark
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
14 static int X10_RF_callback(bitbuffer_t *bitbuffer) {
15 bitrow_t *bb = bitbuffer->bb;
16 // Row [0] is sync pulse
18 if ((bitbuffer->bits_per_row[1] == 32) // Dont waste time on a short package
19 // && (bb[1][0] == (uint8_t)(~bb[1][1])) // Check integrity - apparently some chips may use both bytes..
20 && (bb[1][2] == ((0xff & (~bb[1][3])))) // Check integrity
23 fprintf(stdout, "X10 RF:\n");
24 fprintf(stdout, "data = %02X %02X %02X %02X\n", bb[1][0], bb[1][1], bb[1][2], bb[1][3]);
34 .modulation = OOK_PULSE_PPM_RAW,
35 .short_limit = 1100, // Short gap 500µs, long gap 1680µs
36 .long_limit = 2800, // Gap after sync is 4.5ms (1125)
37 .reset_limit = 6000, // Gap seen between messages is ~40ms so let's get them individually
38 .json_callback = &X10_RF_callback,