Nascent support for OOK TPMS transponders.

Apparently, Subaru and GMC. No CRC or other validation, no attempt to interpret packet contents yet.
This commit is contained in:
Jared Boone 2016-04-11 11:53:17 -07:00
parent dc16aa478f
commit e85503cd81
2 changed files with 47 additions and 2 deletions

View file

@ -21,8 +21,6 @@
#include "proc_tpms.hpp"
#include "portapack_shared_memory.hpp"
#include "dsp_fir_taps.hpp"
TPMSProcessor::TPMSProcessor() {
@ -45,6 +43,18 @@ void TPMSProcessor::execute(const buffer_c8_t& buffer) {
clock_recovery(mf.get_output());
}
}
for(size_t i=0; i<decim_1_out.count; i+=channel_decimation) {
const auto sliced = ook_slicer_5sps(decim_1_out.p[i]);
slicer_history = (slicer_history << 1) | sliced;
ook_clock_recovery_subaru(slicer_history, [this](const bool symbol) {
this->packet_builder_ook_subaru.execute(symbol);
});
ook_clock_recovery_gmc(slicer_history, [this](const bool symbol) {
this->packet_builder_ook_gmc.execute(symbol);
});
}
}
void TPMSProcessor::consume_symbol(