add control table

This commit is contained in:
2024-12-22 16:34:26 +01:00
parent 859611f991
commit 9dd525457e
4 changed files with 71 additions and 5 deletions

View File

@ -1,4 +1,7 @@
#pragma once
#include <time.h>
#define MAX_TEMPERATURE_ENTRIES_PER_DAY 24U
typedef enum _ControlState
{
@ -10,5 +13,37 @@ typedef enum _ControlState
CONTROL_FAULT,
} eControlState;
typedef enum _ControlWeekday
{
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
SUNDAY,
WEEKDAY_COUNT
} eControlWeekday;
typedef struct _ControlTimestamp
{
uint8_t hour;
uint8_t minute;
} sControlTimestamp;
typedef struct _ControlTemperatureEntry
{
sControlTimestamp timestamp;
float fReturnFlowTemperature;
float fChamberTemperature;
} sControlTemperatureEntry;
typedef struct _ControlDay
{
eControlWeekday day;
size_t entryCount; // number of entries for each day
sControlTemperatureEntry aTemperatureEntries[MAX_TEMPERATURE_ENTRIES_PER_DAY];
} sControlDay;
void initControl(void);
eControlState getControlState(void);