First attempts with Doxygen

This commit is contained in:
2020-12-11 20:10:17 +01:00
parent d0f3845dc5
commit b927b1fdb9
4 changed files with 2655 additions and 2 deletions

View File

@ -1,12 +1,23 @@
/**
* \brief Entry point
*
* Deskcontrol is a simple on/off timer switch inteded for use with an ATX PSU.
* The theory of operation is turning on and off power by pulling the control line low/high while
* running of the 5V standby line.
*
* Additional features include support for a DHT11 to log the temperature.
* \file
*/
#include "config.h"
#include <Homie.h>
#include <LoggerNode.h>
LoggerNode LN;
LoggerNode LN; ///<Instance of the LoggerNode library
#include "DHTesp.h"
DHTesp dht;
DHTesp dht; ///< DHT instance
#define OUTPUT_SET(x) digitalWrite(CONFIG_IO_RELAY, x ? LOW : HIGH)
@ -15,6 +26,9 @@ unsigned int next_timer_update = 0;
HomieNode powerNode("power", "Power", "switch");
HomieNode temperatureNode("temperature", "Temperature", "temperature");
/** Power state handler
* Handes event on the power state MQTT node
*/
bool powerStateHandler(const HomieRange& range, const String& value)
{
if (value != "on" && value != "off")
@ -38,6 +52,9 @@ bool powerStateHandler(const HomieRange& range, const String& value)
return true;
}
/**
* Handler for events on the powerTimer node
*/
bool powerTimerHandler(const HomieRange& range, const String& value)
{
int settimer = value.toInt();
@ -101,6 +118,10 @@ void loopHandleTemperature()
}
}
/**
* Main event loop
* \callgraph
*/
void loopHandler()
{
loopHandleTimer();