move all defines in private c file for clarity

This commit is contained in:
gullradriel committed 2026-02-12 12:59:38 +01:00
1 parent 7ab8f6837c
commit 88258a988d
2 files changed
+14 -16

No files matched your search

+14 -2
View File
@@ -2,8 +2,6 @@
#include "../protopirate_app_i.h"
#include <lib/toolbox/manchester_decoder.h>
#define TAG "FiatProtocolV0"
static const SubGhzBlockConst subghz_protocol_fiat_v0_const = {
.te_short = 200,
.te_long = 400,
@@ -11,6 +9,20 @@ static const SubGhzBlockConst subghz_protocol_fiat_v0_const = {
.min_count_bit_for_found = 64,
};
#define TAG "FiatProtocolV0"
#define FIAT_PROTOCOL_V0_NAME "Fiat V0"
/* Worst-case encoder upload capacity (LevelDuration entries)
* Per burst:
* - preamble: FIAT_V0_PREAMBLE_PAIRS * 2
* - data: max 141 entries (see encoder differential rules)
* Between bursts: one inter-burst gap entry
*/
#define FIAT_V0_DATA_MAX_EDGES ((63 + 6) * 2 + 3)
#define FIAT_V0_BURST_MAX_EDGES (FIAT_V0_PREAMBLE_PAIRS * 2 + FIAT_V0_DATA_MAX_EDGES)
#define FIAT_V0_UPLOAD_CAP \
(FIAT_V0_TOTAL_BURSTS * FIAT_V0_BURST_MAX_EDGES + (FIAT_V0_TOTAL_BURSTS - 1))
#define FIAT_V0_PREAMBLE_PAIRS 150
#define FIAT_V0_GAP_US 800
#define FIAT_V0_TOTAL_BURSTS 3
-14
View File
@@ -12,20 +12,6 @@
#include "../defines.h"
#define FIAT_PROTOCOL_V0_NAME "Fiat V0"
/* Worst-case encoder upload capacity (LevelDuration entries)
* Per burst:
* - preamble: FIAT_V0_PREAMBLE_PAIRS * 2
* - data: max 141 entries (see encoder differential rules)
* Between bursts: one inter-burst gap entry
*/
#define FIAT_V0_DATA_MAX_EDGES ((63 + 6) * 2 + 3)
#define FIAT_V0_BURST_MAX_EDGES (FIAT_V0_PREAMBLE_PAIRS * 2 + FIAT_V0_DATA_MAX_EDGES)
#define FIAT_V0_UPLOAD_CAP \
(FIAT_V0_TOTAL_BURSTS * FIAT_V0_BURST_MAX_EDGES + (FIAT_V0_TOTAL_BURSTS - 1))
#define FIAT_V0_GAP_US 800
typedef struct SubGhzProtocolDecoderFiatV0 SubGhzProtocolDecoderFiatV0;
typedef struct SubGhzProtocolEncoderFiatV0 SubGhzProtocolEncoderFiatV0;