add control table
This commit is contained in:
@ -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);
|
Reference in New Issue
Block a user