doxygen finished
This commit is contained in:
@@ -4,71 +4,73 @@
|
||||
* @brief Contains an implementation of the class MenuSysteminformation
|
||||
* @version 0.1
|
||||
* @date 2022-12-27
|
||||
*
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "menuSysteminformation.h"
|
||||
|
||||
MenuSysteminformation::MenuSysteminformation(Battery* mainBattery)
|
||||
: MenuInformationSites(8), mainBattery {mainBattery} {
|
||||
MenuSysteminformation::MenuSysteminformation(Battery *mainBattery)
|
||||
: MenuInformationSites(8), mainBattery{mainBattery}
|
||||
{
|
||||
this->noEqualLeft = true;
|
||||
}
|
||||
|
||||
void MenuSysteminformation::printPage() const {
|
||||
void MenuSysteminformation::printPage() const
|
||||
{
|
||||
String lineOne = "";
|
||||
String lineTwo = "";
|
||||
switch (this->getCurrentPage()) {
|
||||
case 0:
|
||||
lineOne = "Free Heap:";
|
||||
lineTwo.concat(ESP.getFreeHeap());
|
||||
break;
|
||||
switch (this->getCurrentPage())
|
||||
{
|
||||
case 0:
|
||||
lineOne = "Free Heap:";
|
||||
lineTwo.concat(ESP.getFreeHeap());
|
||||
break;
|
||||
|
||||
case 1:
|
||||
lineOne = "Max alloc Heap:";
|
||||
lineTwo.concat(ESP.getMaxAllocHeap());
|
||||
break;
|
||||
case 1:
|
||||
lineOne = "Max alloc Heap:";
|
||||
lineTwo.concat(ESP.getMaxAllocHeap());
|
||||
break;
|
||||
|
||||
case 2:
|
||||
lineOne = "Uptime in secs:";
|
||||
lineTwo.concat((millis() / 1000));
|
||||
break;
|
||||
case 2:
|
||||
lineOne = "Uptime in secs:";
|
||||
lineTwo.concat((millis() / 1000));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
lineOne = "Main battery:";
|
||||
lineTwo = "";
|
||||
lineTwo.concat(this->mainBattery->getBatteryPercent());
|
||||
lineTwo.concat("% - V=");
|
||||
lineTwo.concat(this->mainBattery->getBatteryVoltage());
|
||||
break;
|
||||
case 3:
|
||||
lineOne = "Main battery:";
|
||||
lineTwo = "";
|
||||
lineTwo.concat(this->mainBattery->getBatteryPercent());
|
||||
lineTwo.concat("% - V=");
|
||||
lineTwo.concat(this->mainBattery->getBatteryVoltage());
|
||||
break;
|
||||
|
||||
case 4:
|
||||
lineOne = "Current WiFi";
|
||||
lineTwo = "channel: ";
|
||||
lineTwo.concat(Network::getCurrentChannel());
|
||||
break;
|
||||
case 4:
|
||||
lineOne = "Current WiFi";
|
||||
lineTwo = "channel: ";
|
||||
lineTwo.concat(Network::getCurrentChannel());
|
||||
break;
|
||||
|
||||
case 5:
|
||||
lineOne = "Software verion:";
|
||||
lineTwo = VERSION;
|
||||
break;
|
||||
case 5:
|
||||
lineOne = "Software verion:";
|
||||
lineTwo = VERSION;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
lineOne = "Build timestamp:";
|
||||
lineTwo = String(BUILD_TIMESTAMP).substring(0, 16);
|
||||
break;
|
||||
case 6:
|
||||
lineOne = "Build timestamp:";
|
||||
lineTwo = String(BUILD_TIMESTAMP).substring(0, 16);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
lineOne = "Kleiax Rover by";
|
||||
lineTwo = "Alexander Klein";
|
||||
break;
|
||||
case 7:
|
||||
lineOne = "Kleiax Rover by";
|
||||
lineTwo = "Alexander Klein";
|
||||
break;
|
||||
|
||||
default:
|
||||
this->printDefault();
|
||||
return;
|
||||
default:
|
||||
this->printDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
this->print(lineOne, lineTwo);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
* @brief Contains a class to print informations about the system
|
||||
* @version 0.1
|
||||
* @date 2022-12-27
|
||||
*
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MENU_SYSTEMINFORMATION_H
|
||||
@@ -23,22 +23,23 @@
|
||||
|
||||
/**
|
||||
* @brief Prints information about the current system status.
|
||||
*
|
||||
*
|
||||
* The informations are about the batteries, memory and uptime.
|
||||
*/
|
||||
class MenuSysteminformation : public MenuInformationSites {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new Menu Systeminformation object
|
||||
*
|
||||
* @param mainBattery
|
||||
*/
|
||||
MenuSysteminformation(Battery* mainBattery);
|
||||
class MenuSysteminformation : public MenuInformationSites
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new Menu Systeminformation object
|
||||
*
|
||||
* @param mainBattery
|
||||
*/
|
||||
MenuSysteminformation(Battery *mainBattery);
|
||||
|
||||
private:
|
||||
void printPage() const override;
|
||||
private:
|
||||
void printPage() const override;
|
||||
|
||||
Battery* mainBattery;
|
||||
Battery *mainBattery;
|
||||
};
|
||||
|
||||
#endif // MENU_SYSTEMINFORMATION_H
|
||||
|
||||
Reference in New Issue
Block a user