mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
merge manually formatted stuff too
This commit is contained in:
@@ -71,7 +71,7 @@ bool lfrfid_raw_file_write_header(
|
||||
.max_buffer_size = max_buffer_size};
|
||||
|
||||
size_t size = stream_write(file->stream, (uint8_t*)&header, sizeof(LFRFIDRawFileHeader));
|
||||
return (size == sizeof(LFRFIDRawFileHeader));
|
||||
return size == sizeof(LFRFIDRawFileHeader);
|
||||
}
|
||||
|
||||
bool lfrfid_raw_file_write_buffer(LFRFIDRawFile* file, uint8_t* buffer_data, size_t buffer_size) {
|
||||
|
||||
@@ -155,7 +155,7 @@ void lfrfid_worker_stop_thread(LFRFIDWorker* worker) {
|
||||
bool lfrfid_worker_check_for_stop(LFRFIDWorker* worker) {
|
||||
UNUSED(worker);
|
||||
uint32_t flags = furi_thread_flags_get();
|
||||
return (flags & LFRFIDEventStopMode);
|
||||
return flags & LFRFIDEventStopMode;
|
||||
}
|
||||
|
||||
size_t lfrfid_worker_dict_get_data_size(LFRFIDWorker* worker, LFRFIDProtocol protocol) {
|
||||
|
||||
@@ -198,7 +198,7 @@ static bool electra_can_be_decoded(
|
||||
parity_sum += (*base_data >> (EM_FIRST_ROW_POS - i * EM_BITS_PER_ROW_COUNT + j)) & 1;
|
||||
}
|
||||
|
||||
if((parity_sum % 2)) {
|
||||
if(parity_sum % 2) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -211,7 +211,7 @@ static bool electra_can_be_decoded(
|
||||
parity_sum += (*base_data >> (EM_COLUMN_POS - i + j * EM_BITS_PER_ROW_COUNT)) & 1;
|
||||
}
|
||||
|
||||
if((parity_sum % 2)) {
|
||||
if(parity_sum % 2) {
|
||||
FURI_LOG_D(
|
||||
TAG,
|
||||
"Unexpected column parity found. EM4100 data: %016llX",
|
||||
|
||||
@@ -173,7 +173,7 @@ static bool em4100_can_be_decoded(
|
||||
parity_sum += (*card_data >> (EM_FIRST_ROW_POS - i * EM_BITS_PER_ROW_COUNT + j)) & 1;
|
||||
}
|
||||
|
||||
if((parity_sum % 2)) {
|
||||
if(parity_sum % 2) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -186,7 +186,7 @@ static bool em4100_can_be_decoded(
|
||||
parity_sum += (*card_data >> (EM_COLUMN_POS - i + j * EM_BITS_PER_ROW_COUNT)) & 1;
|
||||
}
|
||||
|
||||
if((parity_sum % 2)) {
|
||||
if(parity_sum % 2) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ static bool protocol_fdx_a_can_be_decoded(const uint8_t* data) {
|
||||
decoded_data[i] &= 0x7F;
|
||||
}
|
||||
|
||||
return (parity_sum == 0);
|
||||
return parity_sum == 0;
|
||||
}
|
||||
|
||||
bool protocol_fdx_a_decoder_feed(ProtocolFDXA* protocol, bool level, uint32_t duration) {
|
||||
|
||||
@@ -71,7 +71,7 @@ static bool protocol_nexwatch_check_preamble(uint8_t* data, size_t bit_index) {
|
||||
}
|
||||
|
||||
static uint8_t protocol_nexwatch_parity_swap(uint8_t parity) {
|
||||
uint8_t a = (((parity >> 3) & 1));
|
||||
uint8_t a = ((parity >> 3) & 1);
|
||||
a |= (((parity >> 1) & 1) << 1);
|
||||
a |= (((parity >> 2) & 1) << 2);
|
||||
a |= ((parity & 1) << 3);
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
#include "lfrfid_protocols.h"
|
||||
#include <toolbox/manchester_decoder.h>
|
||||
|
||||
#define TAG "SECURAKEY"
|
||||
#define TAG "SECURAKEY"
|
||||
|
||||
#define SECURAKEY_RKKT_ENCODED_FULL_SIZE_BITS (96)
|
||||
#define SECURAKEY_RKKT_ENCODED_FULL_SIZE_BYTE (12)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user