added menu for systeminformation
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* @file menuSysteminformatio.cpp
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief Contains an implementation of the class MenuSysteminformation
|
||||
* @version 0.1
|
||||
* @date 2022-12-27
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
|
||||
#include "menuSysteminformation.h"
|
||||
|
||||
void MenuSysteminformation::printPage() const {
|
||||
String lineOne = "";
|
||||
String lineTwo = "";
|
||||
switch (this->getCurrentPage()) {
|
||||
case 0:
|
||||
lineOne = "Free Heap:";
|
||||
lineTwo.concat(ESP.getFreeHeap());
|
||||
break;
|
||||
|
||||
case 1:
|
||||
lineOne = "Uptime in secs:";
|
||||
lineTwo.concat((millis() / 1000));
|
||||
break;
|
||||
|
||||
default:
|
||||
this->printDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
this->print(lineOne, lineTwo);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @file menuSysteminformation.h
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @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
|
||||
#define MENU_SYSTEMINFORMATION_H
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "menuInformationSites.h"
|
||||
|
||||
class MenuSysteminformation : public MenuInformationSites {
|
||||
public:
|
||||
MenuSysteminformation() : MenuInformationSites(5) {}
|
||||
|
||||
private:
|
||||
void printPage() const override;
|
||||
};
|
||||
|
||||
#endif // MENU_SYSTEMINFORMATION_H
|
||||
Reference in New Issue
Block a user