LevelMeter-Display  2.0
An ultrasonic Level Meter for Stormwater Cisterns
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Macros | Enumerations | Functions | Variables
Config.h File Reference

Go to the source code of this file.

Data Structures

struct  confStruct_t
 Holds all Configuration Data stored in EEPROM. More...
 
struct  signalOutput_t
 Holds the Thresholds for a Signal Optocoupler Output. More...
 

Macros

#define CONF_MAGIC   0x3797
 Change this value if confStruct_t becomes incompatible to previous versions! More...
 
#define NUM_SIGNAL   2
 Number of available signal outputs. More...
 
#define SNDMASK_ALERT1ALWAYS   1
 Signal 2 Alert is played outside silent period, too. More...
 
#define SNDMASK_ALERT2ALWAYS   2
 Signal 1 Alert is played outside silent period, too. More...
 
#define SNDMASK_HOURBELL   4
 Big Ben is played every hour. More...
 

Enumerations

enum  cisternType_T { CIST_CONST_AREA, CIST_HORIZ_CYL, CIST_SPHERE }
 

Functions

void DumpConfig (void)
 Lists the current configuration values. More...
 
void DumpConfigSignal (uint8_t number)
 DumpConfig Helper Function for Optocoupler outputs. More...
 
void ReadConfig (void)
 Reads the Config-Struct from EEPROM into config. More...
 
bool SoundsOK (void)
 Checks if sounds may currently be played. More...
 
void WriteConfig (void)
 Writes the Config-Struct to EEPROM. More...
 

Variables

confStruct_t config
 The Configuration. It is read on startup from the EEPROM. More...
 
bool configDirty
 Set to true by routines affecting configuration if config memory needs to be saved to the EEPROM. More...
 

Macro Definition Documentation

#define CONF_MAGIC   0x3797

Change this value if confStruct_t becomes incompatible to previous versions!

#define NUM_SIGNAL   2

Number of available signal outputs.

#define SNDMASK_ALERT1ALWAYS   1

Signal 2 Alert is played outside silent period, too.

#define SNDMASK_ALERT2ALWAYS   2

Signal 1 Alert is played outside silent period, too.

#define SNDMASK_HOURBELL   4

Big Ben is played every hour.

Enumeration Type Documentation

Enumerator
CIST_CONST_AREA 

Cistern with constant area over volume.

CIST_HORIZ_CYL 

Cistern of horizontal cylinder type.

CIST_SPHERE 

Spherical cistern.

Function Documentation

void DumpConfig ( void  )

Lists the current configuration values.

Prints a verbose explanation of the configuration data to the host.

void DumpConfigSignal ( uint8_t  number)

DumpConfig Helper Function for Optocoupler outputs.

Parameters
numberThe Number of the Signal Output (Zero-based)
void ReadConfig ( void  )

Reads the Config-Struct from EEPROM into config.

Only the config-struct in RAM will be used. Changes in config will only become permanent if you use a write-command. There is a configDirty-flag that is set by every routine that changes config and is used to remind the user to execute a write-command.

bool SoundsOK ( void  )

Checks if sounds may currently be played.

"Curremtly" means at the actual time-of-day. Check this function before you play sounds that should not be always enabled.

Returns
true if sounds are ok, false if not
void WriteConfig ( void  )

Writes the Config-Struct to EEPROM.

Variable Documentation

confStruct_t config

The Configuration. It is read on startup from the EEPROM.

bool configDirty

Set to true by routines affecting configuration if config memory needs to be saved to the EEPROM.