LevelMeter-Display  2.0
An ultrasonic Level Meter for Stormwater Cisterns
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Config.h
Go to the documentation of this file.
1 ï»¿/*
2  * Config.h
3  *
4  * Created: 12.11.2012 09:47:29
5  * Author: Robert Loos
6  */
7 
8 
9 #ifndef CONFIG_H_
10 #define CONFIG_H_
11 
12 #include <stdbool.h>
13 #include <stdio.h>
14 #include "Display.h"
15 
16 #define CONF_MAGIC 0x3797
17 #define NUM_SIGNAL 2
18 
19 #define SNDMASK_ALERT1ALWAYS 1
20 #define SNDMASK_ALERT2ALWAYS 2
21 #define SNDMASK_HOURBELL 4
22 
23 
24 typedef struct
25 {
26  uint16_t activeBelow;
27  uint16_t activeAbove;
29 
30 typedef enum {
34  } cisternType_T;
35 
37 typedef struct
38 { uint16_t magic;
42  double cistLength;
43  double cistHeight;
44  double cistCapacity;
45  uint8_t invDCF77;
46  uint8_t LCDV0;
47  uint8_t LCDBright;
48  double P3VoltsPerLSB;
49  double P5VoltsPerLSB;
53  uint8_t backlightOnTime;
54  uint8_t pageTime;
55  uint8_t pageTimeK;
56  signalOutput_t signalOutputs[NUM_SIGNAL];
57  uint8_t sndHourFrom;
58  uint8_t sndHourTo;
59  uint8_t sndMask;
60  uint8_t instCal;
61  bool useRts;
62 } confStruct_t;
63 extern bool configDirty;
64 
65 extern confStruct_t config;
66 void ReadConfig(void);
67 void WriteConfig(void);
68 void DumpConfigSignal(uint8_t number);
69 void DumpConfig(void);
70 bool SoundsOK(void);
71 
72 #endif /* CONFIG_H_ */