Skip to content
This repository has been archived by the owner on Jan 11, 2020. It is now read-only.

Commit

Permalink
Basecamp: Show MAC on Serial, fixes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
merlinschumacher committed Jan 12, 2018
1 parent 223a660 commit c82c291
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Basecamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
Written by Merlin Schumacher ([email protected]) for c't magazin für computer technik (https://www.ct.de)
Licensed under GPLv3. See LICENSE for details.
*/
#define DEBUG 1

#include "Basecamp.hpp"
#include "debug.hpp"

Expand All @@ -25,7 +23,8 @@ String Basecamp::_generateHostname() {

bool Basecamp::begin() {
Serial.begin(115200);
Serial.println("Basecamp V.0.1.5");
Serial.print("Basecamp V.");
Serial.println(version);
configuration.begin("/basecamp.json");
if (!configuration.load()) {
DEBUG_PRINTLN("Configuration is broken. Resetting.");
Expand Down Expand Up @@ -103,6 +102,7 @@ bool Basecamp::begin() {
}
#endif

Serial.println(showSystemInfo());
}


Expand Down Expand Up @@ -228,3 +228,9 @@ String Basecamp::_generateMac() {
}
return mac;
}

String Basecamp::showSystemInfo() {
String Info = "";
Info += "MAC-Address: " + mac;
return Info;
}
2 changes: 2 additions & 0 deletions Basecamp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ class Basecamp {
public:
Basecamp() {};
~Basecamp() {};
String version = "0.1.5";
Configuration configuration;
Preferences preferences;
bool begin();
bool checkResetReason();
String showSystemInfo();
String hostname;
struct taskParms {
char* parm1;
Expand Down

0 comments on commit c82c291

Please sign in to comment.