mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 10:57:48 +00:00
Add Tamper Flags to ERT RX display and meter ID to log file (#1707)
This commit is contained in:
@@ -82,6 +82,19 @@ CommodityType Packet::commodity_type() const {
|
||||
return invalid_commodity_type;
|
||||
}
|
||||
|
||||
TamperFlags Packet::tamper_flags() const {
|
||||
if (type() == Type::SCM) {
|
||||
return (reader_.read(9, 2) << 4) | reader_.read(3, 2); // Physical/Encoder tamper flags in lower/upper nibbles
|
||||
}
|
||||
if (type() == Type::SCMPLUS) {
|
||||
return reader_.read(10 * 8, 16);
|
||||
}
|
||||
if (type() == Type::IDM) {
|
||||
return reader_.read(11 * 8, 48);
|
||||
}
|
||||
return invalid_tamper_flags;
|
||||
}
|
||||
|
||||
FormattedSymbols Packet::symbols_formatted() const {
|
||||
return format_symbols(decoder_);
|
||||
}
|
||||
|
Reference in New Issue
Block a user