|
LevelMeter-Display
2.0
An ultrasonic Level Meter for Stormwater Cisterns
|
Structures and Constants for Configuration Handling. More...


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... | |
Structures and Constants for Configuration Handling.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
| #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.
| enum cisternType_T |
| void DumpConfig | ( | void | ) |
Lists the current configuration values.
Prints a verbose explanation of the configuration data to the host.
References confStruct_t::backlightAlwaysOn, confStruct_t::backlightOnTime, CIST_CONST_AREA, CIST_HORIZ_CYL, CIST_SPHERE, confStruct_t::cistAreaOrDiameter, confStruct_t::cistCapacity, confStruct_t::cisternType, confStruct_t::cistHeight, config, DCF77_PINMASK, DISPLAY_2x16, DISPLAY_4x20, DISPLAY_ANALOG, confStruct_t::displayType, DumpConfigSignal(), hprintf_P(), confStruct_t::instCal, confStruct_t::invDCF77, confStruct_t::LCDBright, confStruct_t::LCDV0, confStruct_t::P3VoltsPerLSB, confStruct_t::P5VoltsPerLSB, confStruct_t::pageTime, confStruct_t::pageTimeK, confStruct_t::sndHourFrom, confStruct_t::sndHourTo, confStruct_t::sndMask, SNDMASK_ALERT1ALWAYS, SNDMASK_ALERT2ALWAYS, SNDMASK_HOURBELL, confStruct_t::SWUnregVoltsPerLSB, confStruct_t::UnregVoltsPerLSB, and confStruct_t::useRts.
Referenced by CmdDumpConf().


| void DumpConfigSignal | ( | uint8_t | number | ) |
DumpConfig Helper Function for Optocoupler outputs.
| number | The Number of the Signal Output (Zero-based) |
References signalOutput_t::activeAbove, signalOutput_t::activeBelow, config, hprintf_P(), and confStruct_t::signalOutputs.
Referenced by CmdSetSignal(), and DumpConfig().


| 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.
References CONF_MAGIC, config, configDirty, defaultConfig, DefaultConfig(), and confStruct_t::magic.
Referenced by Init().


| bool SoundsOK | ( | void | ) |
Checks if sounds may currently be played.
"Currently" means at the actual time-of-day. Check this function before you play sounds that should not be always enabled.
References config, hrCnt, confStruct_t::sndHourFrom, and confStruct_t::sndHourTo.
Referenced by DoTflags().

| void WriteConfig | ( | void | ) |
Writes the Config-Struct to EEPROM.
References config, configDirty, and defaultConfig.
Referenced by CmdWrite(), and DefaultConfig().

| confStruct_t config |
The Configuration. It is read on startup from the EEPROM.
Referenced by AssertRTS(), CmdCalibrate(), CmdSetBright(), CmdSetCistern(), CmdSetContrast(), CmdSetDCFInv(), CmdSetDisplay(), CmdSetPTime(), CmdSetPTimeK(), CmdSetSignal(), CmdSetSounds(), CmdSetSpontaneous(), CmdStat(), CmdUseRts(), DefaultConfig(), DoCflags(), DoKFlags(), DoTflags(), DumpConfig(), DumpConfigSignal(), EnterDouble(), GetPinState(), HBarGraphPerCent(), Init(), ISR(), LCDBuildVBarChars(), LCDHBarGraph(), LCDPrintLine_P(), LitersFromDist(), main(), P3FromADC(), P5FromADC(), putchar_LCD(), ReadConfig(), ReleaseRTS(), SetAnalogPerCent(), ShowScreen(), SoundsOK(), SWUnregFromADC(), UnregFromADC(), UsartTimerCallback(), VBarGraphPrepare(), and WriteConfig().
| bool configDirty |
Set to true by routines affecting configuration if config memory needs to be saved to the EEPROM.
Referenced by CmdCalibrate(), CmdSetBright(), CmdSetCistern(), CmdSetContrast(), CmdSetDCFInv(), CmdSetDisplay(), CmdSetPTime(), CmdSetPTimeK(), CmdSetSignal(), CmdSetSounds(), CmdSetSpontaneous(), CmdUseRts(), CmdWrite(), ExecCommand(), ReadConfig(), and WriteConfig().
1.8.15