mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
More TPMS variable/enum renaming.
This commit is contained in:
parent
249e6ab21e
commit
38b374506e
@ -49,10 +49,10 @@ void TPMSProcessor::execute(const buffer_c8_t& buffer) {
|
||||
slicer_history = (slicer_history << 1) | sliced;
|
||||
|
||||
clock_recovery_ook_8k192(slicer_history, [this](const bool symbol) {
|
||||
this->packet_builder_schrader.execute(symbol);
|
||||
this->packet_builder_ook_8k192_schrader.execute(symbol);
|
||||
});
|
||||
clock_recovery_ook_8k4(slicer_history, [this](const bool symbol) {
|
||||
this->packet_builder_ook_gmc.execute(symbol);
|
||||
this->packet_builder_ook_8k4_schrader.execute(symbol);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ private:
|
||||
{ },
|
||||
{ 160 },
|
||||
[this](const baseband::Packet& packet) {
|
||||
const TPMSPacketMessage message { tpms::SignalType::FLM, packet };
|
||||
const TPMSPacketMessage message { tpms::SignalType::FSK_19k2_Schrader, packet };
|
||||
shared_memory.application_queue.push(message);
|
||||
}
|
||||
};
|
||||
@ -100,12 +100,12 @@ private:
|
||||
channel_sample_rate / 8192.0f
|
||||
};
|
||||
|
||||
PacketBuilder<BitPattern, NeverMatch, FixedLength> packet_builder_schrader {
|
||||
PacketBuilder<BitPattern, NeverMatch, FixedLength> packet_builder_ook_8k192_schrader {
|
||||
{ 0b010101010101010101011110, 24, 0 },
|
||||
{ },
|
||||
{ 74 },
|
||||
[](const baseband::Packet& packet) {
|
||||
const TPMSPacketMessage message { tpms::SignalType::Schrader, packet };
|
||||
const TPMSPacketMessage message { tpms::SignalType::OOK_8k192_Schrader, packet };
|
||||
shared_memory.application_queue.push(message);
|
||||
}
|
||||
};
|
||||
@ -114,12 +114,12 @@ private:
|
||||
channel_sample_rate / 8400.0f
|
||||
};
|
||||
|
||||
PacketBuilder<BitPattern, NeverMatch, FixedLength> packet_builder_ook_gmc {
|
||||
PacketBuilder<BitPattern, NeverMatch, FixedLength> packet_builder_ook_8k4_schrader {
|
||||
{ 0b01010101010101010101010101100101, 32, 0 },
|
||||
{ },
|
||||
{ 192 },
|
||||
[](const baseband::Packet& packet) {
|
||||
const TPMSPacketMessage message { tpms::SignalType::GMC, packet };
|
||||
const TPMSPacketMessage message { tpms::SignalType::OOK_8k4_Schrader, packet };
|
||||
shared_memory.application_queue.push(message);
|
||||
}
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ ManchesterFormatted Packet::symbols_formatted() const {
|
||||
}
|
||||
|
||||
Optional<Reading> Packet::reading(const SignalType signal_type) const {
|
||||
if( signal_type == SignalType::FLM ) {
|
||||
if( signal_type == SignalType::FSK_19k2_Schrader ) {
|
||||
const auto length = crc_valid_length();
|
||||
|
||||
switch(length) {
|
||||
@ -67,7 +67,7 @@ Optional<Reading> Packet::reading(const SignalType signal_type) const {
|
||||
}
|
||||
}
|
||||
|
||||
if( signal_type == SignalType::Schrader ) {
|
||||
if( signal_type == SignalType::OOK_8k192_Schrader ) {
|
||||
const auto flags = reader_.read(0, 3);
|
||||
const auto checksum = reader_.read(35, 2);
|
||||
|
||||
@ -80,7 +80,7 @@ Optional<Reading> Packet::reading(const SignalType signal_type) const {
|
||||
};
|
||||
}
|
||||
|
||||
if( signal_type == SignalType::GMC ) {
|
||||
if( signal_type == SignalType::OOK_8k4_Schrader ) {
|
||||
return Reading {
|
||||
Reading::Type::GMC_96,
|
||||
reader_.read(20, 32),
|
||||
|
@ -40,9 +40,9 @@ namespace tpms {
|
||||
using Flags = uint8_t;
|
||||
|
||||
enum SignalType : uint32_t {
|
||||
FLM = 1,
|
||||
Schrader = 2,
|
||||
GMC = 3,
|
||||
FSK_19k2_Schrader = 1,
|
||||
OOK_8k192_Schrader = 2,
|
||||
OOK_8k4_Schrader = 3,
|
||||
};
|
||||
|
||||
class TransponderID {
|
||||
|
Loading…
Reference in New Issue
Block a user