From 24b4a8d8a6e864cd4f2547cca63a15a67a7f7937 Mon Sep 17 00:00:00 2001 From: Nanosonde <2073569+nanosonde@users.noreply.github.com> Date: Sun, 5 Jul 2020 15:28:08 +0200 Subject: [PATCH] Cleanup comment and debug output --- src/knx/bau_systemB.cpp | 11 +++++------ src/knx/security_interface_object.cpp | 3 ++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/knx/bau_systemB.cpp b/src/knx/bau_systemB.cpp index bcba1c1..7a99b10 100644 --- a/src/knx/bau_systemB.cpp +++ b/src/knx/bau_systemB.cpp @@ -186,35 +186,34 @@ uint8_t BauSystemB::masterReset(EraseCode eraseCode, uint8_t channel) case EraseCode::ResetAP: { // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER) - println("ResetAP requested."); + println("ResetAP requested. Not implemented yet."); return successCode; } case EraseCode::ResetIA: { // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER) - println("ResetAP requested."); + println("ResetAP requested. Not implemented yet."); return successCode; } case EraseCode::ResetLinks: { // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER) - println("ResetLinks requested."); + println("ResetLinks requested. Not implemented yet."); return successCode; } case EraseCode::ResetParam: { // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER) - println("ResetParam requested."); + println("ResetParam requested. Not implemented yet."); return successCode; } case EraseCode::FactoryReset: case EraseCode::FactoryResetWithoutIA: { // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER) - -#ifdef USE_DATASECURE print("Factory reset requested. type: "); println(eraseCode == EraseCode::FactoryReset ? "FactoryReset with IA" : "FactoryReset without IA"); +#ifdef USE_DATASECURE // If erase code is FactoryReset or FactoryResetWithoutIA, set FDSK as toolkey again // and disable security mode _secIfObj.factoryReset(); diff --git a/src/knx/security_interface_object.cpp b/src/knx/security_interface_object.cpp index 2377693..1e65850 100644 --- a/src/knx/security_interface_object.cpp +++ b/src/knx/security_interface_object.cpp @@ -9,7 +9,7 @@ #include "callback_property.h" #include "function_property.h" -// Our FDSK. It is never changed from ETS. This is permanent default tool key restarted on every factory reset of the device. +// Our FDSK. It is never changed from ETS. This is the permanent default tool key that is restored on every factory reset of the device. const uint8_t SecurityInterfaceObject::_fdsk[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }; uint8_t SecurityInterfaceObject::_secReport[] = { 0x00, 0x00, 0x00 }; uint8_t SecurityInterfaceObject::_secReportCtrl[] = { 0x00, 0x00, 0x00 }; @@ -316,6 +316,7 @@ void SecurityInterfaceObject::errorCode(ErrorCode errorCode) void SecurityInterfaceObject::factoryReset() { + println("Factory reset of security interface object requested."); _secAppLayer->setSecurityMode(false); property(PID_TOOL_KEY)->write(1, 1, _fdsk); }