From b0944ba9e2ae3d86b888e15050218fb11980d434 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 13 Apr 2026 07:43:01 +0300 Subject: m2: split Pebble-free types into separate header --- src/c/fastforge.h | 21 ++------------------- src/c/fastforge_types.h | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 src/c/fastforge_types.h (limited to 'src') diff --git a/src/c/fastforge.h b/src/c/fastforge.h index c7b370d..6c24e75 100644 --- a/src/c/fastforge.h +++ b/src/c/fastforge.h @@ -1,26 +1,9 @@ #ifndef FASTFORGE_H #define FASTFORGE_H -#include - -/* Persisted fast record shared by the running state and history list. */ -typedef struct { - time_t start_time; - time_t end_time; // 0 = currently running - uint16_t target_minutes; - char note[32]; - uint8_t max_stage_reached; // 0=none, 1=12h, 2=18h, 3=24h+ -} FastEntry; +#include "fastforge_types.h" -/* Derived streak counters rebuilt from completed fast end dates. */ -typedef struct { - uint16_t current_streak; - uint16_t longest_streak; - time_t last_completed_fast_end; -} StreakData; - -#define MAX_FASTS 64 -#define DEFAULT_TARGET_MINUTES (16 * 60) +#include #define KEY_HISTORY_COUNT 1 #define KEY_HISTORY_DATA 2 diff --git a/src/c/fastforge_types.h b/src/c/fastforge_types.h new file mode 100644 index 0000000..e31dd96 --- /dev/null +++ b/src/c/fastforge_types.h @@ -0,0 +1,26 @@ +#ifndef FASTFORGE_TYPES_H +#define FASTFORGE_TYPES_H + +#include +#include + +/* Persisted fast record shared by the running state and history list. */ +typedef struct { + time_t start_time; + time_t end_time; // 0 = currently running + uint16_t target_minutes; + char note[32]; + uint8_t max_stage_reached; // 0=none, 1=12h, 2=18h, 3=24h+ +} FastEntry; + +/* Derived streak counters rebuilt from completed fast end dates. */ +typedef struct { + uint16_t current_streak; + uint16_t longest_streak; + time_t last_completed_fast_end; +} StreakData; + +#define MAX_FASTS 64 +#define DEFAULT_TARGET_MINUTES (16 * 60) + +#endif -- cgit v1.2.3