From c82c291d1731d539b86236bd45ab36e7d52cb1c9 Mon Sep 17 00:00:00 2001 From: Merlin Schumacher Date: Fri, 12 Jan 2018 19:41:48 +0100 Subject: [PATCH] Basecamp: Show MAC on Serial, fixes #10 --- Basecamp.cpp | 12 +++++++++--- Basecamp.hpp | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Basecamp.cpp b/Basecamp.cpp index d570dba..29fd20c 100644 --- a/Basecamp.cpp +++ b/Basecamp.cpp @@ -3,8 +3,6 @@ Written by Merlin Schumacher (mls@ct.de) 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" @@ -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."); @@ -103,6 +102,7 @@ bool Basecamp::begin() { } #endif + Serial.println(showSystemInfo()); } @@ -228,3 +228,9 @@ String Basecamp::_generateMac() { } return mac; } + +String Basecamp::showSystemInfo() { + String Info = ""; + Info += "MAC-Address: " + mac; + return Info; +} diff --git a/Basecamp.hpp b/Basecamp.hpp index cbddbd7..6f8f968 100644 --- a/Basecamp.hpp +++ b/Basecamp.hpp @@ -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;