Adds one example and normalizes names

- There are now two examples in the examples directory.

- Adds RF433ANY_ prefix to macros as needed.

- Passes arduino-lint check.
This commit is contained in:
Sébastien Millet 2021-06-04 15:55:01 +02:00
parent 7864217c19
commit 5230785d3f
32 changed files with 1189 additions and 117 deletions

View File

@ -66,10 +66,10 @@ FLO/R (rolling code).
* A 'sync' prefix made of a succession of low and high of the same duration.
Note such a prefix could be regarded as Manchester encoding of as many '0' bits
(when using CONVENTION_0, see below). The library assumes that such a sequence,
if seen at the beginning ('short' and 'long' durations are not yet known),
corresponds to a synchronization prefix, not to a Manchester encoding of '0'
bits.
(when using RF433ANY_CONV0, see below). The library assumes that such a
sequence, if seen at the beginning ('short' and 'long' durations are not yet
known), corresponds to a synchronization prefix, not to a Manchester encoding
of '0' bits.
The signal decoding can be done using two conventions.
Switching from one convention to another for the same signal will simply invert
@ -79,12 +79,12 @@ bit values.
Bit value depending on convention
---------------------------------
| | Signal shape | CONVENTION_0 | CONVENTION_1 |
| ---------------- | --------------------- | ------------ | ------------ |
| Tri-bit | low short, high long | 0 | 1 |
| Tri-bit | low long, high short | 1 | 0 |
| Tri-bit Inverted | high short, low long | 0 | 1 |
| Tri-bit Inverted | high long, low short | 1 | 0 |
| Manchester | low short, high short | 0 | 1 |
| Manchester | high short, low short | 1 | 0 |
| | Signal shape | RF433ANY_CONV0 | RF433ANY_CONV1 |
| ---------------- | --------------------- | -------------- | -------------- |
| Tri-bit | low short, high long | 0 | 1 |
| Tri-bit | low long, high short | 1 | 0 |
| Tri-bit Inverted | high short, low long | 0 | 1 |
| Tri-bit Inverted | high long, low short | 1 | 0 |
| Manchester | low short, high short | 0 | 1 |
| Manchester | high short, low short | 1 | 0 |

View File

@ -144,7 +144,7 @@ inline void Band::breset() {
}
inline bool Band::init(uint16_t d) {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("B> init: %u", d);
#endif
@ -162,11 +162,11 @@ inline bool Band::init(uint16_t d) {
}
inline bool Band::init_sep(uint16_t d) {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("BSEP> init: %u", d);
#endif
sup = MAX_SEP_DURATION;
sup = RF433ANY_MAX_SEP_DURATION;
inf = d >> 1;
inf += (inf >> 2);
mid = d;
@ -180,11 +180,11 @@ inline bool Band::test_value_init_if_needed(uint16_t d) {
init(d);
} else {
got_it = (d >= inf && d <= sup);
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("B> cmp %u to [%u, %u]", d, inf, sup);
#endif
}
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("B> res: %d", got_it);
#endif
return got_it;
@ -193,16 +193,16 @@ inline bool Band::test_value_init_if_needed(uint16_t d) {
inline bool Band::test_value(uint16_t d) {
if (!mid) {
got_it = false;
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("BSEP> cmp %u to uninitialized d", d);
#endif
} else {
got_it = (d >= inf && d <= sup);
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("BSEP> cmp %u to [%u, %u]", d, inf, sup);
#endif
}
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("BSEP> res: %d", got_it);
#endif
return got_it;
@ -232,7 +232,7 @@ inline void Rail::rreset_soft() {
}
inline bool Rail::rail_eat(uint16_t d) {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("R> index = %d, d = %u", index, d);
#endif
@ -247,7 +247,7 @@ inline bool Rail::rail_eat(uint16_t d) {
byte band_count = get_band_count();
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("R> b_short.got_it = %d, b_long.got_it = %d, "
"band_count = %d", b_short.got_it, b_long.got_it,
band_count);
@ -287,14 +287,14 @@ inline bool Rail::rail_eat(uint16_t d) {
assert(false);
}
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("R> P0");
#endif
if ((small << 2) >= big) {
if (pband->init(d)) {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("R> P1");
#endif
@ -336,21 +336,21 @@ inline bool Rail::rail_eat(uint16_t d) {
// BAND_MAX_D is 30000, and multiplying .mid by 2 will produce a
// maximum value of 60000, that's OK for an unsigned 16-bit int.
if (d >= (b_short.mid << 1) && d >= (b_long.mid << 1)) {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("R> init b_sep");
#endif
// We can end up with an overlap between b_sep and b_long.
// Not an issue.
b_sep.init_sep(d);
} else {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("R> no init of b_sep (d too small)");
#endif
}
}
status = (b_sep.test_value(d) ? RAIL_STP_RCVD : RAIL_ERROR);
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("R> rail terminated, status = %d", status);
#endif
@ -591,15 +591,15 @@ Decoder::~Decoder() {
Decoder* Decoder::build_decoder(byte id, byte convention) {
switch (id) {
case DEC_ID_RAW_SYNC:
case RF433ANY_ID_RAW_SYNC:
return new DecoderRawSync(0);
case DEC_ID_TRIBIT:
case RF433ANY_ID_TRIBIT:
return new DecoderTriBit(convention);
case DEC_ID_TRIBIT_INV:
case RF433ANY_ID_TRIBIT_INV:
return new DecoderTriBitInv(convention);
case DEC_ID_MANCHESTER:
case RF433ANY_ID_MANCHESTER:
return new DecoderManchester(convention);
case DEC_ID_RAW_UNKNOWN_CODING:
case RF433ANY_ID_RAW_UNKNOWN_CODING:
return new DecoderRawUnknownCoding();
default:
assert(false);
@ -1052,7 +1052,7 @@ unsigned int sim_int_count_svg;
unsigned int counter;
#endif
#ifdef DBG_TIMINGS
#ifdef RF433ANY_DBG_TIMINGS
uint16_t Track::ih_dbg_timings[40];
uint16_t Track::ih_dbg_exec[40];
unsigned int Track::ih_dbg_pos = 0;
@ -1099,8 +1099,8 @@ void Track::ih_handle_interrupt() {
byte r = (digitalRead(pin_number) == HIGH ? 1 : 0);
#endif
if (d > MAX_DURATION)
d = MAX_DURATION;
if (d > RF433ANY_MAX_DURATION)
d = RF433ANY_MAX_DURATION;
unsigned char next_IH_write_head = (IH_write_head + 1) & IH_MASK;
// No ideal solution here: we reached the buffer size, so either we
@ -1116,7 +1116,7 @@ void Track::ih_handle_interrupt() {
}
void Track::force_stop_recv() {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("T> running force_stop_recv()");
#endif
if (get_trk() == TRK_RECV) {
@ -1135,7 +1135,7 @@ void Track::reset_border_mgmt() {
inline void Track::track_eat(byte r, uint16_t d) {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("T> trk = %d, r = %d, d = %u", trk, r, d);
#endif
@ -1164,14 +1164,14 @@ inline void Track::track_eat(byte r, uint16_t d) {
prev_r = r;
++count;
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("T> count = %d", count);
#endif
if (count == 1) {
if ((d < BAND_MIN_D || d >= rawcode.max_code_d)
&& count < TRACK_MIN_BITS && !rawcode.nb_sections) {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("T> case 1");
#endif
treset();
@ -1179,7 +1179,7 @@ inline void Track::track_eat(byte r, uint16_t d) {
// Re-entrant call... not ideal.
track_eat(r, d);
} else {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("T> case 2");
#endif
first_low = d;
@ -1188,7 +1188,7 @@ inline void Track::track_eat(byte r, uint16_t d) {
} else if (count == 2) {
if ((d < BAND_MIN_D || d >= rawcode.max_code_d)
&& count < TRACK_MIN_BITS && !rawcode.nb_sections) {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("T> case 3");
#endif
treset();
@ -1196,14 +1196,14 @@ inline void Track::track_eat(byte r, uint16_t d) {
// Re-entrant call... not ideal.
track_eat(r, d);
} else {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("T> case 4");
#endif
first_high = d;
}
return;
}
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("T> case 5");
#endif
@ -1231,7 +1231,7 @@ inline void Track::track_eat(byte r, uint16_t d) {
if (r == 1 && (!b || r_low.status != RAIL_OPEN)) {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("T> b = %d", b);
#endif
@ -1333,7 +1333,7 @@ Notations:
}
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("T> reccursec=%i, sts=%i", record_current_section, sts);
#endif
#if defined(RF433ANY_DBG_SIMULATE) && defined(RF433ANY_DBG_TRACK)
@ -1347,7 +1347,7 @@ Notations:
#endif
if (record_current_section) {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("T> recording current section");
#endif
Section *psec = &rawcode.sections[rawcode.nb_sections++];
@ -1387,12 +1387,12 @@ Notations:
trk = ((rawcode.nb_sections == RF433ANY_MAX_SECTIONS)
? TRK_DATA : TRK_RECV);
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbgf("T> rawcode.nb_sections = %d", rawcode.nb_sections);
#endif
if (trk == TRK_RECV) {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("T> keep receiving (soft reset)");
#endif
r_low.rreset_soft();
@ -1401,7 +1401,7 @@ Notations:
reset_border_mgmt();
}
} else {
#ifdef DBG_TRACE
#ifdef RF433ANY_DBG_TRACE
dbg("T> stop receiving (data)");
#endif
}
@ -1443,14 +1443,14 @@ bool Track::process_interrupt_timing() {
IH_read_head = (IH_read_head + 1) & IH_MASK;
sei();
#ifdef DBG_TIMINGS
#ifdef RF433ANY_DBG_TIMINGS
unsigned long t0 = micros();
#endif
track_eat(timing.r, timing.d);
#ifdef DBG_TIMINGS
#ifdef RF433ANY_DBG_TIMINGS
unsigned long d = micros() - t0;
if (d > MAX_DURATION)
d = MAX_DURATION;
if (d > RF433ANY_MAX_DURATION)
d = RF433ANY_MAX_DURATION;
ih_dbg_exec[ih_dbg_pos] = d;
if (get_trk() == TRK_WAIT)
ih_dbg_pos = 0;
@ -1536,7 +1536,7 @@ Decoder* Track::get_data_core(byte convention) {
}
} else {
byte enum_decoders = DEC_ID_START;
byte enum_decoders = RF433ANY_ID_START;
bool is_continuation_of_prev_section = pdec;
do {
if (!pdec)
@ -1548,7 +1548,7 @@ Decoder* Track::get_data_core(byte convention) {
delete pdec;
pdec = nullptr;
}
} while (!pdec && ++enum_decoders <= DEC_ID_END);
} while (!pdec && ++enum_decoders <= RF433ANY_ID_END);
}
// The last enumerated decoder is DecoderRawUnknownCoding, that
@ -1586,7 +1586,12 @@ Decoder* Track::get_data(uint16_t filter, byte convention) {
bool keep = true;
if (filter & RF433ANY_FD_DECODED) {
if (!pdec->data_got_decoded())
// Defensive programming
// Normally if data_got_decoded() is true then pdata is non
// null and pdata->get_nb_bits() is non-zero.
if (!pdec->data_got_decoded()
|| !pdec->get_pdata()
|| !pdec->get_pdata()->get_nb_bits())
keep = false;
}
@ -1610,13 +1615,13 @@ Decoder* Track::get_data(uint16_t filter, byte convention) {
if (filter & (RF433ANY_FD_TRI | RF433ANY_FD_TRN | RF433ANY_FD_MAN)) {
if (!(filter & RF433ANY_FD_TRI)
&& pdec->get_id() == DEC_ID_TRIBIT)
&& pdec->get_id() == RF433ANY_ID_TRIBIT)
keep = false;
if (!(filter & RF433ANY_FD_TRN)
&& pdec->get_id() == DEC_ID_TRIBIT_INV)
&& pdec->get_id() == RF433ANY_ID_TRIBIT_INV)
keep = false;
if (!(filter & RF433ANY_FD_MAN)
&& pdec->get_id() == DEC_ID_MANCHESTER)
&& pdec->get_id() == RF433ANY_ID_MANCHESTER)
keep = false;
}
@ -1643,7 +1648,7 @@ Decoder* Track::get_data(uint16_t filter, byte convention) {
return pdec0;
}
#ifdef DBG_TIMINGS
#ifdef RF433ANY_DBG_TIMINGS
void Track::dbg_timings() const {
for (unsigned int i = 0; i + 1 < ih_dbg_pos; i += 2) {
dbgf("%4u, %4u | %5u, %5u", ih_dbg_timings[i], ih_dbg_timings[i + 1],

View File

@ -63,8 +63,8 @@
// not in the test plan.
//#define RF433ANY_DBG_SIMULATE
//#define DBG_TRACE
//#define DBG_TIMINGS
//#define RF433ANY_DBG_TRACE
//#define RF433ANY_DBG_TIMINGS
//#define RF433ANY_DBG_TRACK
//#define RF433ANY_DBG_RAWCODE
//#define RF433ANY_DBG_DECODER
@ -72,8 +72,8 @@
#endif // RF433ANY_TESTPLAN
#if defined(RF433ANY_DBG_SIMULATE) || defined(DBG_TRACE) \
|| defined(DBG_TIMINGS) || defined(RF433ANY_DBG_TRACK) \
#if defined(RF433ANY_DBG_SIMULATE) || defined(RF433ANY_DBG_TRACE) \
|| defined(RF433ANY_DBG_TIMINGS) || defined(RF433ANY_DBG_TRACK) \
|| defined(RF433ANY_DBG_RAWCODE) || defined(RF433ANY_DBG_DECODER)
#define DEBUG
#endif
@ -96,8 +96,8 @@
#include <Arduino.h>
#define MAX_DURATION 65535
#define MAX_SEP_DURATION 65535
#define RF433ANY_MAX_DURATION 65535
#define RF433ANY_MAX_SEP_DURATION 65535
#ifndef RF433ANY_MAX_SECTIONS
#define RF433ANY_MAX_SECTIONS 8
#endif
@ -293,11 +293,11 @@ class BitVector {
// IMPORTANT
// VALUES ARE NOT ARBITRARY.
// CONVENTION_0 must be 0 and CONVENTION_1 must be 1.
// RF433ANY_CONV0 must be 0 and RF433ANY_CONV1 must be 1.
// This is due to the decoding that uses a bit value ultimately coming
// from CONVENTION_0 or CONVENTION_1.
#define CONVENTION_0 0
#define CONVENTION_1 1
// from RF433ANY_CONV0 or RF433ANY_CONV1.
#define RF433ANY_CONV0 0
#define RF433ANY_CONV1 1
enum class Signal {
SHORT,
@ -315,15 +315,15 @@ enum class Signal {
#define RF433ANY_FD_TRN 16
#define RF433ANY_FD_MAN 32
#define DEC_ID_RAW_INCONSISTENT 0
#define DEC_ID_START 1 // Start of enumeration of real decoders
#define DEC_ID_RAW_SYNC 1
#define DEC_ID_TRIBIT 2
#define DEC_ID_TRIBIT_INV 3
#define DEC_ID_MANCHESTER 4
#define DEC_ID_RAW_UNKNOWN_CODING 5 // At last we use this one, that'll always
// produce a successful result.
#define DEC_ID_END 5 // End of enumeration of real decoders
#define RF433ANY_ID_RAW_INCONSISTENT 0
#define RF433ANY_ID_START 1 // Start enumeration of real decoders
#define RF433ANY_ID_RAW_SYNC 1
#define RF433ANY_ID_TRIBIT 2
#define RF433ANY_ID_TRIBIT_INV 3
#define RF433ANY_ID_MANCHESTER 4
#define RF433ANY_ID_RAW_UNKNOWN_CODING 5 // At last we use this one, that'll
// always produce a successful result.
#define RF433ANY_ID_END 5 // End of enumeration of real decoders
class Decoder {
private:
@ -388,10 +388,12 @@ class Decoder {
class DecoderRawInconsistent: public Decoder {
public:
DecoderRawInconsistent(): Decoder(CONVENTION_0) { }
DecoderRawInconsistent(): Decoder(RF433ANY_CONV0) { }
~DecoderRawInconsistent() { }
virtual byte get_id() const override { return DEC_ID_RAW_INCONSISTENT; }
virtual byte get_id() const override {
return RF433ANY_ID_RAW_INCONSISTENT;
}
virtual char get_id_letter() const override { return 'I'; }
virtual void add_signal_step(Signal lo, Signal hi) override { }
@ -414,12 +416,12 @@ class DecoderRawSync: public Decoder {
public:
DecoderRawSync(byte arg_nb_low_high):
Decoder(CONVENTION_0),
Decoder(RF433ANY_CONV0),
nb_low_high(arg_nb_low_high),
sync_shape_set(false) { }
~DecoderRawSync() { }
virtual byte get_id() const override { return DEC_ID_RAW_SYNC; }
virtual byte get_id() const override { return RF433ANY_ID_RAW_SYNC; }
virtual char get_id_letter() const override { return 'S'; }
virtual void add_signal_step(Signal lo, Signal hi) override;
@ -446,13 +448,13 @@ class DecoderRawUnknownCoding: public Decoder {
public:
DecoderRawUnknownCoding():
Decoder(CONVENTION_0),
Decoder(RF433ANY_CONV0),
unused_final_low(Signal::OTHER),
terminates_with_sep(false) { }
~DecoderRawUnknownCoding() { }
virtual byte get_id() const override
{ return DEC_ID_RAW_UNKNOWN_CODING; }
{ return RF433ANY_ID_RAW_UNKNOWN_CODING; }
virtual char get_id_letter() const override { return 'U'; }
virtual void add_signal_step(Signal lo, Signal hi) override;
@ -470,17 +472,19 @@ class DecoderRawUnknownCoding: public Decoder {
class DecoderTriBit: public Decoder {
public:
DecoderTriBit(byte arg_convention = CONVENTION_0)
DecoderTriBit(byte arg_convention = RF433ANY_CONV0)
:Decoder(arg_convention) {
}
~DecoderTriBit() { }
virtual byte get_id() const override { return DEC_ID_TRIBIT; }
virtual byte get_id() const override { return RF433ANY_ID_TRIBIT; }
virtual char get_id_letter() const override { return 'T'; }
virtual void add_signal_step(Signal low, Signal high)
override;
virtual bool data_got_decoded() const override { return true; }
virtual bool data_got_decoded() const override {
return pdata && pdata->get_nb_bits();
}
#ifdef RF433ANY_DBG_DECODER
virtual void dbg_decoder(byte disp_level, byte seq) const override;
@ -500,19 +504,21 @@ class DecoderTriBitInv: public Decoder {
Signal last_hi;
public:
DecoderTriBitInv(byte arg_convention = CONVENTION_0)
DecoderTriBitInv(byte arg_convention = RF433ANY_CONV0)
:Decoder(arg_convention),
first_call_to_add_sgn_lo_hi(true),
unused_initial_low(Signal::OTHER) {
}
~DecoderTriBitInv() { }
virtual byte get_id() const override { return DEC_ID_TRIBIT_INV; }
virtual byte get_id() const override { return RF433ANY_ID_TRIBIT_INV; }
virtual char get_id_letter() const override { return 'N'; }
virtual void add_signal_step(Signal low, Signal high)
override;
virtual bool data_got_decoded() const override { return true; }
virtual bool data_got_decoded() const override {
return pdata && pdata->get_nb_bits();
}
virtual uint16_t first_lo_ignored() const override;
@ -542,15 +548,17 @@ class DecoderManchester: public Decoder {
void consume_buf();
public:
DecoderManchester(byte arg_convention = CONVENTION_0);
DecoderManchester(byte arg_convention = RF433ANY_CONV0);
~DecoderManchester() { }
virtual byte get_id() const override { return DEC_ID_MANCHESTER; }
virtual byte get_id() const override { return RF433ANY_ID_MANCHESTER; }
virtual char get_id_letter() const override { return 'M'; }
virtual void add_signal_step(Signal low, Signal high)
override;
virtual bool data_got_decoded() const override { return true; }
virtual bool data_got_decoded() const override {
return pdata && pdata->get_nb_bits();
}
#ifdef RF433ANY_DBG_DECODER
virtual void dbg_decoder(byte disp_level, byte seq) const override;
@ -599,7 +607,7 @@ class Track {
private:
#ifdef DBG_TIMINGS
#ifdef RF433ANY_DBG_TIMINGS
static uint16_t ih_dbg_timings[40];
static uint16_t ih_dbg_exec[40];
static unsigned int ih_dbg_pos;
@ -640,7 +648,7 @@ class Track {
#ifdef RF433ANY_DBG_TRACK
void track_debug() const;
#endif
#ifdef DBG_TIMINGS
#ifdef RF433ANY_DBG_TIMINGS
void dbg_timings() const;
#endif
@ -652,7 +660,7 @@ class Track {
void deactivate_recording();
bool process_interrupt_timing();
bool do_events();
Decoder* get_data(uint16_t filter, byte convention = CONVENTION_0);
Decoder* get_data(uint16_t filter, byte convention = RF433ANY_CONV0);
};
#endif // _RF433ANY_H

View File

@ -0,0 +1,63 @@
// 01_output-received-code.ino
// Example sketch that comes along with RF433any library
// Simply displays received codes
/*
Copyright 2021 Sébastien Millet
`RF433any' is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
`RF433any' is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this program. If not, see
<https://www.gnu.org/licenses>.
*/
//
// Schematic: Radio Frequencies RECEIVER plugged on D2
//
#include "RF433any.h"
#include <Arduino.h>
#define PIN_RFINPUT 2
void setup() {
pinMode(PIN_RFINPUT, INPUT);
Serial.begin(115200);
Serial.print("Waiting for signal\n");
}
Track track(PIN_RFINPUT);
void loop() {
track.treset();
while (!track.do_events())
delay(1);
Decoder *pdec0 = track.get_data(
RF433ANY_FD_DECODED | RF433ANY_FD_DEDUP | RF433ANY_FD_NO_ERROR
);
for (Decoder *pdec = pdec0; pdec != nullptr; pdec = pdec->get_next()) {
Serial.print("Received ");
Serial.print(pdec->get_nb_bits());
Serial.print(" bits (x");
Serial.print(pdec->get_repeats() + 1);
Serial.print("): ");
char *buf = pdec->get_pdata()->to_str();
Serial.println(buf);
free(buf);
}
delete pdec0;
}
// vim: ts=4:sw=4:tw=80:et

View File

@ -1,6 +1,8 @@
// output-signal-timings.ino
// 02_output-signal-timings.ino
// Example sketch that comes along with RF433any library
// Displays all signals details (incl. non-coding sequences) along with their
// timings
/*
Copyright 2021 Sébastien Millet
@ -21,7 +23,7 @@
*/
//
// Schematic: see RF433any library
// Schematic: Radio Frequencies RECEIVER plugged on D2
//
#include "RF433any.h"
@ -45,10 +47,30 @@ void serial_printf(const char* msg, ...) {
Serial.print(serial_printf_buffer);
}
const char welcome[] PROGMEM =
"Waiting for signal\n"
" Durations are in microseconds\n"
" Data is output in hexdecimal\n"
" When high durations are equal to low, they are nul\n"
" I: Initseq = 'high' radio signal sent once\n"
" LS: Low Short duration\n"
" LL: Low Long duration\n"
" HS: High Short duration\n"
" HL: High Long duration\n"
" S: Separator = typically separating repeats\n"
" U: Low signal prefix (zero most frequently)\n"
" V: High signal prefix (zero most frequently)\n"
" Y: First low non-coding signal, if any "
"(only tribit inverted)\n"
" Z: Last low signal\n";
void setup() {
pinMode(PIN_RFINPUT, INPUT);
Serial.begin(115200);
Serial.print("Waiting for signal\n");
char *buf = (char *)malloc(sizeof(welcome));
strcpy_P(buf, welcome);
Serial.print(buf);
free(buf);
}
Track track(PIN_RFINPUT);
@ -58,10 +80,11 @@ void output_timings(Decoder *pdec) {
if (!pdec)
return;
pdec->get_tsext(&tsext);
serial_printf(" I=%u, LS=%u, LL=%u, HS=%u, HL=%u, S=%u, U=%u, V=%u, "
"Y=%u, Z=%u\n", tsext.initseq, tsext.low_short, tsext.low_long,
tsext.high_short, tsext.high_long, tsext.sep, tsext.first_low,
tsext.first_high, tsext.first_low_ignored, tsext.last_low);
serial_printf(" I=%u, LS=%u, LL=%u, HS=%u, HL=%u, S=%u, U=%u, "
"V=%u, Y=%u, Z=%u\n", tsext.initseq, tsext.low_short,
tsext.low_long, tsext.high_short, tsext.high_long, tsext.sep,
tsext.first_low, tsext.first_high, tsext.first_low_ignored,
tsext.last_low);
}
void loop() {
@ -70,16 +93,17 @@ void loop() {
while (!track.do_events())
delay(1);
Decoder *pdec0 = track.get_data(RF433ANY_FD_DEDUP);
Decoder *pdec0 = track.get_data(RF433ANY_FD_ALL);
Decoder *pdec = pdec0;
while(pdec) {
int nb_bits = pdec->get_nb_bits();
bool got_data = pdec->data_got_decoded();
BitVector *pdata = pdec->take_away_data();
serial_printf("Decoded: %s, err: %d, code: %c, "
"rep: %d, bits: %2d",
(pdec->data_got_decoded() ? "yes" : "no "),
"rep: %d, bits: %2d", (got_data ? "yes" : "no "),
pdec->get_nb_errors(), pdec->get_id_letter(),
pdec->get_repeats() + 1, pdec->get_nb_bits());
pdec->get_repeats() + 1, nb_bits);
if (pdec->data_got_decoded()) {
Serial.print(", data: ");
@ -91,9 +115,9 @@ void loop() {
}
delete pdata;
}
// output_timings(pdec);
}
Serial.print("\n");
output_timings(pdec);
pdec = pdec->get_next();
}
delete pdec0;

View File

@ -0,0 +1,10 @@
ARDUINO_DIR = /usr/share/arduino
ARDUINO_LIBS = RF433any
ARDMK_DIR = /home/sebastien/.arduino_mk
# USER_LIB_PATH = /home/sebastien/travail/cpp/seb/arduino/libraries
BOARD_TAG = uno
MCU = atmega328
include $(ARDMK_DIR)/Arduino.mk

View File

@ -0,0 +1,343 @@
#!/usr/bin/bash
# am
# Copyright 2019, 2020, 2021 Sébastien Millet
# Can perform the following:
# 1. Compile the code
# 2. Upload to Arduino
# 3. Read (continually) what is arriving from the USB port the Arduino is
# connected to
# Versions history (as of 1.3)
# 1.3 Output from Arduino is recorded in files named with numbers instead of
# date-time string.
# 1.4 Adds -t (--testplan) option, to set TESTPLAN macro
# 1.5 -t (or --testplan) now comes with a value, so as to manage multiple test
# plans.
# 1.6 Updated to work fine with Arch arduino package instead of the manually
# installed (from tar.gz source) package used so far.
# 1.7 Renames archlinux-arduino back to arduino, and created corresponding
# symlink (was cleaner to do s).
set -euo pipefail
VERSION=1.7
PORT=
BOARD=
SPEED=
FQBN=
BUILDDIR=
RECORDDIR=out
READSPEED=
RECORDFILE=
UPLOAD="no"
VERBOSE="no"
CATUSB="no"
STTY="no"
RECORDUSB="no"
COMPILE="yes"
TESTPLAN=
DISPLAYSEP=no
function finish {
if [ "${DISPLAYSEP}" == "yes" ]; then
echo "-----END ARDUINO OUTPUT-----" | tee -a "${RECORDFILE}"
fi
}
trap finish EXIT
function usage {
echo "Usage:"
echo " am [OPTIONS...] FILE"
echo "Compile FILE using arduino-builder."
echo "Example: am sketch.ino"
echo ""
echo "ENVIRONMENT VARIABLES"
echo " If ARDUINO_USER_LIBS is defined and non empty, then arduino-builder"
echo " is called with the supplementary option -libraries followed by"
echo " ARDUINO_USER_LIBS' value."
echo ""
echo "OPTIONS"
echo " -h --help Display this help screen"
echo " -V --version Output version information and quit"
echo " -v --verbose Be more talkative"
echo " -u --upload Upload compiled code into Arduino"
echo " -b --board Board, either 'uno' or 'nano'"
echo " -p --port Port, for ex. '/dev/ttyUSB0'"
echo " -s --speed Upload speed, for ex. 115200"
echo " Normally, speed is infered from device type:"
echo " 115200 for Uno, 57600 for Nano"
echo " -B --fqbn Board Fully Qualified Name, like 'arduino:avr:uno'"
echo " -d --builddir Build directory"
echo " -c --catusb Display (continually) what Arduino writes on USB"
echo " --stty Tune stty properly for later communication (implied"
echo " by --catusb)"
echo " -r --recordusb Write USB (continually) to a file (implies -c)"
echo " --recordfile Output file if -r option is set"
echo " -n --nocompile Don't compile code"
echo " --readspeed Read speed of USB. If not specified, this script"
echo " will try to infere it from source file. If it"
echo " fails, it'll fallback to 9600."
echo " This option is useful only if USB is read"
echo " (-c or --stty option set)"
echo " -t --testplan Set TESTPLAN macro value"
echo " (as if #define TESTPLAN VALUE)"
exit 1
}
function version {
echo "am version ${VERSION}"
exit
}
OPTS=$(getopt -o hVvub:p:s:B:d:crnt: --long help,version,verbose,upload,board:,port:,speed:,fqbn:,builddir:,catusb,stty,recordusb,nocompile,readspeed:,recordfile:,testplan: -n 'am' -- "$@")
eval set -- "$OPTS"
while true; do
case "$1" in
-h | --help ) usage; shift ;;
-V | --version ) version; shift ;;
-v | --verbose ) VERBOSE="yes"; shift ;;
-u | --upload ) UPLOAD="yes"; shift ;;
-b | --board ) BOARD="$2"; shift 2 ;;
-p | --port ) PORT="$2"; shift 2 ;;
-s | --speed ) SPEED="$2"; shift 2 ;;
-B | --fqbn ) FQBN="$2"; shift 2 ;;
-d | --builddir ) BUILDDIR="$2"; shift 2 ;;
-c | --catusb ) CATUSB="yes"; shift ;;
-r | --recordusb ) RECORDUSB="yes"; CATUSB="yes"; shift ;;
-n | --nocompile ) COMPILE="no"; shift ;;
--readspeed ) READSPEED="$2"; shift 2 ;;
--recordfile ) RECORDFILE="$2"; shift 2 ;;
--stty ) STTY="yes"; shift ;;
-t | --testplan ) TESTPLAN="$2"; shift 2 ;;
-- ) shift; break ;;
* ) break ;;
esac
done
FILE=${1:-}
TRAILINGOPTS=${2:-}
if [ -n "${TRAILINGOPTS}" ]; then
echo "Error: trailing options"
exit 1;
fi
if [ -z "${FILE}" ]; then
echo "Error: no input file"
exit 1;
fi
set +e
if [ -n "${BOARD}" ]; then
if [ "${BOARD}" != "uno" ] && [ "${BOARD}" != "nano" ]; then
echo "Error: board '${BOARD}' unknown"
exit 1
fi
fi
#ARDUINODIR=$(LANG='' type -a arduino \
# | tail -n 1 \
# | sed 's/\S\+\sis\s//')
#ARDUINODIR=$(readlink -f "${ARDUINODIR}")
#ARDUINODIR=$(dirname "${ARDUINODIR}")
ARDUINODIR=/usr/share/arduino
COUNTUNO=$(compgen -G '/dev/ttyACM*' | wc -l)
COUNTNANO=$(compgen -G '/dev/ttyUSB*' | wc -l)
if [ -z "${BOARD}" ]; then
if [ "${COUNTUNO}" -ge 1 ] && [ "${COUNTNANO}" -ge 1 ]; then
echo "Error: cannot guess board, found ${COUNTUNO} uno(s), ${COUNTNANO} nano(s)"
exit 10
fi
if [ "${COUNTUNO}" -ge 1 ]; then
BOARD=uno
elif [ "${COUNTNANO}" -ge 1 ]; then
BOARD=nano
fi
if [ -z "${BOARD}" ]; then
echo "Error: cannot guess board, none found";
exit 10
fi
fi
if [ "${UPLOAD}" == "yes" ] || [ "${CATUSB}" == "yes" ]; then
if [ -z "${PORT}" ]; then
if [ "${BOARD}" == "uno" ]; then
COUNT=${COUNTUNO}
PORT=$(compgen -G '/dev/ttyACM*')
elif [ "${BOARD}" == "nano" ]; then
COUNT=${COUNTNANO}
PORT=$(compgen -G '/dev/ttyUSB*')
else
echo "FATAL #001, CHECK THIS CODE"
exit 99
fi
if [ "${COUNT}" -ge 2 ]; then
echo "Error: cannot guess port, more than 1 board '${BOARD}' found"
exit 10
fi
if [ -z "${PORT}" ]; then
echo "Error: cannot guess port, none found"
exit 10
fi
fi
if [ -z "${SPEED}" ]; then
if [ "${BOARD}" == "uno" ]; then
SPEED=115200
elif [ "${BOARD}" == "nano" ]; then
SPEED=57600
else
echo "FATAL #002, CHECK THIS CODE"
exit 99
fi
fi
if [ ! -e "${PORT}" ]; then
echo "Error: port not found"
exit 10
fi
fi
if [ -z "${FQBN}" ]; then
if [ "${BOARD}" == "uno" ]; then
FQBN="arduino:avr:uno"
elif [ "${BOARD}" == "nano" ]; then
FQBN="arduino:avr:nano:cpu=atmega328old"
else
echo "FATAL #003, CHECK THIS CODE"
exit 99
fi
fi
if [ -z "${BUILDDIR}" ]; then
if [[ "${FILE}" == */* ]]; then
BUILDDIR=${FILE%/*}
BUILDDIR="${BUILDDIR%/}/build"
else
BUILDDIR=build
fi
fi
if [ "${RECORDUSB}" == "yes" ]; then
if [ -z "${RECORDFILE}" ]; then
V=${FILE##*/}
V=${V%.*}
V=${V:-out}
PREV=
for i in {15..00}; do
F="${RECORDDIR}/${V}-$i.txt"
if [ -e "${F}" ] && [ -n "${PREV}" ]; then
mv "${F}" "${PREV}"
fi
PREV="${F}"
done
RECORDFILE="${F}"
mkdir -p "${RECORDDIR}"
fi
else
RECORDFILE="/dev/null"
fi
if [ "${VERBOSE}" == "yes" ]; then
echo "-- Settings"
echo "Arduino dir: ${ARDUINODIR}"
echo "Board: ${BOARD}"
echo "Port: ${PORT}"
echo "Speed: ${SPEED}"
echo "Fqbn: ${FQBN}"
echo "Upload: ${UPLOAD}"
echo "Catusb: ${CATUSB}"
echo "Recordusb: ${RECORDUSB}"
echo "Record file: ${RECORDFILE}"
echo "Verbose: ${VERBOSE}"
echo "File: ${FILE}"
echo "Build dir: ${BUILDDIR}"
fi
set -e
if [ "${COMPILE}" == "yes" ]; then
echo "-- Compile"
mkdir -p "${BUILDDIR}"
OPT_LIB=
TMP_ULIB=${ARDUINO_USER_LIBS:-}
if [ -n "${TMP_ULIB}" ]; then
OPT_LIB="-libraries ""${TMP_ULIB}"""
fi
TESTPLAN_OPT=""
if [ -n "${TESTPLAN}" ]; then
TESTPLAN_OPT="-prefs=build.extra_flags=-DTESTPLAN=${TESTPLAN}"
fi
# shellcheck disable=SC2086
# (We don't want to quote OPT_LIB as it can contain multiple options.)
"${ARDUINODIR}/arduino-builder" \
-hardware "${ARDUINODIR}/hardware" \
-tools "${ARDUINODIR}/hardware/tools/avr" \
-tools "${ARDUINODIR}/tools-builder" \
-built-in-libraries "${ARDUINODIR}/libraries" \
${OPT_LIB} \
-fqbn "${FQBN}" \
-build-path "${BUILDDIR}" \
${TESTPLAN_OPT} \
"${FILE}"
fi
FILEBASENAME=${FILE##*/}
if [ "${UPLOAD}" == "yes" ]; then
echo "-- Upload"
"/usr/bin/avrdude" \
-q -q -patmega328p -carduino -P"${PORT}" -b"${SPEED}" -D \
-Uflash:w:"${BUILDDIR}/${FILEBASENAME}".hex:i
fi
if [ "${CATUSB}" == "yes" ] || [ "${STTY}" == "yes" ]; then
if [ -z "${READSPEED}" ]; then
TFILE=$(mktemp)
gcc -fpreprocessed -dD -x c++ -E "${FILE}" > "${TFILE}"
for sp in 9600 19200 28800 38400 57600 115200; do
if grep ${sp} "${TFILE}" > /dev/null; then
READSPEED=${sp}
fi
done
READSPEED=${READSPEED:-9600}
rm "${TFILE}"
fi
stty -F "${PORT}" -hupcl -echo "${READSPEED}"
echo "-- usb setup with speed ${READSPEED}"
fi
if [ "${CATUSB}" == "yes" ]; then
echo "-- Read usb (Ctrl-C to quit)"
DISPLAYSEP=yes
{
echo "speed=${READSPEED}"
echo "fqbn=${FQBN}"
echo "port=${PORT}"
echo "file=${FILE}"
echo "filedate=$(date +"%Y-%m-%dT%H:%M:%SZ" -d @$(stat -c '%Y' "${FILE}"))"
echo "date=$(date +'%Y-%m-%dT%H:%M:%SZ')"
echo ""
echo "-----BEGIN ARDUINO OUTPUT-----"
} | tee "${RECORDFILE}"
tee -a "${RECORDFILE}" < "${PORT}"
fi

View File

@ -98,24 +98,20 @@ void read_simulated_timings_from_usb() {
#if RF433ANY_TESTPLAN == 5
void output_decoder(Decoder *pdec) {
while(pdec) {
int nb_bits = pdec->get_nb_bits();
BitVector *pdata = pdec->take_away_data();
dbgf("Decoded: %s, err: %d, code: %c, "
"rep: %d, bits: %2d",
(pdec->data_got_decoded() ? "yes" : "no "),
pdec->get_nb_errors(), pdec->get_id_letter(),
pdec->get_repeats() + 1, nb_bits);
pdec->get_repeats() + 1, pdec->get_nb_bits());
if (pdec->data_got_decoded()) {
Serial.print(" Data: ");
if (pdata) {
char *buf = pdata->to_str();
if (pdec->get_pdata()) {
char *buf = pdec->get_pdata()->to_str();
if (buf) {
Serial.print(buf);
free(buf);
}
delete pdata;
}
Serial.print("\n");
}
@ -148,7 +144,7 @@ void loop() {
}
track.force_stop_recv();
#ifdef DBG_TIMINGS
#ifdef RF433ANY_DBG_TIMINGS
track.dbg_timings();
#endif

View File

@ -0,0 +1,53 @@
2, 0
0, 9000
596, 596
506, 506
600, 600
600, 600
600, 600
600, 600
600, 600
600, 600
600 , 9000
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
576, 1236,
576, 536,
1280, 1232,
596, 528,
1292, 1228,
600, 1228,
600, 1228,
608, 528,
1316, 529,
1316, 529,
529, 7020
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
1309, 23912
0, 0
0, 0

View File

@ -0,0 +1,6 @@
Decoded: no , err: 0, code: S, rep: 1, bits: 8
Decoded: yes, err: 0, code: T, rep: 1, bits: 9
Data: 01 5c
Decoded: yes, err: 0, code: T, rep: 1, bits: 9
Data: 01 5c
Decoded: no , err: 0, code: U, rep: 1, bits: 14

View File

@ -0,0 +1,53 @@
4, 0
0, 9000
596, 596
506, 506
600, 600
600, 600
600, 600
600, 600
600, 600
600, 600
600 , 9000
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
576, 1236,
576, 536,
1280, 1232,
596, 528,
1292, 1228,
600, 1228,
600, 1228,
608, 528,
1316, 529,
1316, 529,
529, 7020
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
1309, 23912
0, 0
0, 0

View File

@ -0,0 +1,6 @@
Decoded: no , err: 0, code: S, rep: 1, bits: 8
Decoded: yes, err: 0, code: T, rep: 2, bits: 9
Data: 01 5c
Decoded: yes, err: 1, code: N, rep: 1, bits: 9
Data: 01 5c
Decoded: no , err: 0, code: U, rep: 1, bits: 14

View File

@ -0,0 +1,53 @@
8, 0
0, 9000
596, 596
506, 506
600, 600
600, 600
600, 600
600, 600
600, 600
600, 600
600 , 9000
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
576, 1236,
576, 536,
1280, 1232,
596, 528,
1292, 1228,
600, 1228,
600, 1228,
608, 528,
1316, 529,
1316, 529,
529, 7020
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
1309, 23912
0, 0
0, 0

View File

@ -0,0 +1,6 @@
Decoded: no , err: 0, code: S, rep: 1, bits: 8
Decoded: yes, err: 0, code: T, rep: 1, bits: 9
Data: 01 5c
Decoded: yes, err: 0, code: T, rep: 1, bits: 9
Data: 01 5c
Decoded: no , err: 0, code: U, rep: 1, bits: 14

View File

@ -0,0 +1,53 @@
16, 0
0, 9000
596, 596
506, 506
600, 600
600, 600
600, 600
600, 600
600, 600
600, 600
600 , 9000
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
576, 1236,
576, 536,
1280, 1232,
596, 528,
1292, 1228,
600, 1228,
600, 1228,
608, 528,
1316, 529,
1316, 529,
529, 7020
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
1309, 23912
0, 0
0, 0

View File

@ -0,0 +1,4 @@
Decoded: no , err: 0, code: S, rep: 1, bits: 8
Decoded: yes, err: 1, code: N, rep: 1, bits: 9
Data: 01 5c
Decoded: no , err: 0, code: U, rep: 1, bits: 14

View File

@ -0,0 +1,53 @@
32, 0
0, 9000
596, 596
506, 506
600, 600
600, 600
600, 600
600, 600
600, 600
600, 600
600 , 9000
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
576, 1236,
576, 536,
1280, 1232,
596, 528,
1292, 1228,
600, 1228,
600, 1228,
608, 528,
1316, 529,
1316, 529,
529, 7020
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
1309, 23912
0, 0
0, 0

View File

@ -0,0 +1,2 @@
Decoded: no , err: 0, code: S, rep: 1, bits: 8
Decoded: no , err: 0, code: U, rep: 1, bits: 14

View File

@ -0,0 +1,53 @@
7, 0
0, 9000
596, 596
506, 506
600, 600
600, 600
600, 600
600, 600
600, 600
600, 600
600 , 9000
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
576, 1236,
576, 536,
1280, 1232,
596, 528,
1292, 1228,
600, 1228,
600, 1228,
608, 528,
1316, 529,
1316, 529,
529, 7020
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
1309, 23912
0, 0
0, 0

View File

@ -0,0 +1,2 @@
Decoded: yes, err: 0, code: T, rep: 2, bits: 9
Data: 01 5c

View File

@ -0,0 +1,53 @@
15, 0
0, 9000
596, 596
506, 506
600, 600
600, 600
600, 600
600, 600
600, 600
600, 600
600 , 9000
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
576, 1236,
576, 536,
1280, 1232,
596, 528,
1292, 1228,
600, 1228,
600, 1228,
608, 528,
1316, 529,
1316, 529,
529, 7020
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
1309, 23912
0, 0
0, 0

View File

@ -0,0 +1,2 @@
Decoded: yes, err: 0, code: T, rep: 2, bits: 9
Data: 01 5c

View File

@ -0,0 +1,53 @@
23, 0
0, 9000
596, 596
506, 506
600, 600
600, 600
600, 600
600, 600
600, 600
600, 600
600 , 9000
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
576, 1236,
576, 536,
1280, 1232,
596, 528,
1292, 1228,
600, 1228,
600, 1228,
608, 528,
1316, 529,
1316, 529,
529, 7020
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
1309, 23912
0, 0
0, 0

View File

View File

@ -0,0 +1,53 @@
38, 0
0, 9000
596, 596
506, 506
600, 600
600, 600
600, 600
600, 600
600, 600
600, 600
600 , 9000
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
576, 1236,
576, 536,
1280, 1232,
596, 528,
1292, 1228,
600, 1228,
600, 1228,
608, 528,
1316, 529,
1316, 529,
529, 7020
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
1309, 23912
0, 0
0, 0

View File

@ -0,0 +1,2 @@
Decoded: no , err: 0, code: S, rep: 1, bits: 8
Decoded: no , err: 0, code: U, rep: 1, bits: 14

View File

@ -0,0 +1,53 @@
56, 0
0, 9000
596, 596
506, 506
600, 600
600, 600
600, 600
600, 600
600, 600
600, 600
600 , 9000
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
576, 1236,
576, 536,
1280, 1232,
596, 528,
1292, 1228,
600, 1228,
600, 1228,
608, 528,
1316, 529,
1316, 529,
529, 7020
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
1309, 23912
0, 0
0, 0

View File

@ -0,0 +1,8 @@
Decoded: no , err: 0, code: S, rep: 1, bits: 8
Decoded: yes, err: 0, code: T, rep: 1, bits: 9
Data: 01 5c
Decoded: yes, err: 0, code: T, rep: 1, bits: 9
Data: 01 5c
Decoded: yes, err: 1, code: N, rep: 1, bits: 9
Data: 01 5c
Decoded: no , err: 0, code: U, rep: 1, bits: 14

View File

@ -0,0 +1,53 @@
63, 0
0, 9000
596, 596
506, 506
600, 600
600, 600
600, 600
600, 600
600, 600
600, 600
600 , 9000
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
1236, 576
536, 1280
1232, 596
528, 1292
1228, 600
1228, 600
1228, 608
528, 1316
529, 1319
522, 7020
576, 1236,
576, 536,
1280, 1232,
596, 528,
1292, 1228,
600, 1228,
600, 1228,
608, 528,
1316, 529,
1316, 529,
529, 7020
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
700, 644
1309, 23912
0, 0
0, 0

View File

@ -0,0 +1,2 @@
Decoded: yes, err: 0, code: T, rep: 2, bits: 9
Data: 01 5c