diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-12 09:59:46 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-12 09:59:46 +0300 |
| commit | 58382f5f5376ba6ab3832e8606467881089ecf15 (patch) | |
| tree | 839625640c1cd885a19fedb310b7285aa9cd209d /src/c/fastforge.h | |
| parent | 860b9c1f1d97eec46d42a90dc9bf887233e7218e (diff) | |
h2: add day-1 fasting data model and persist keys
Diffstat (limited to 'src/c/fastforge.h')
| -rw-r--r-- | src/c/fastforge.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/c/fastforge.h b/src/c/fastforge.h new file mode 100644 index 0000000..1ab5339 --- /dev/null +++ b/src/c/fastforge.h @@ -0,0 +1,30 @@ +#ifndef FASTFORGE_H +#define FASTFORGE_H + +#include <pebble.h> + +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; + +#define MAX_FASTS 64 +#define DEFAULT_TARGET_MINUTES (16 * 60) + +#define KEY_HISTORY_COUNT 1 +#define KEY_HISTORY_DATA 2 +#define KEY_CURRENT_FAST 3 +#define KEY_TARGET_MIN 4 +#define KEY_STREAK_DATA 5 + +extern FastEntry history[MAX_FASTS]; +extern int history_count; +extern FastEntry current_fast; +extern uint16_t global_target_minutes; +extern AppTimer *alarm_timer; +extern time_t target_time; + +#endif |
