mirror of
				https://github.com/thelsing/knx.git
				synced 2025-10-26 10:26:25 +01:00 
			
		
		
		
	Cleanup comment and debug output
This commit is contained in:
		
							parent
							
								
									53f6828872
								
							
						
					
					
						commit
						24b4a8d8a6
					
				@ -186,35 +186,34 @@ uint8_t BauSystemB::masterReset(EraseCode eraseCode, uint8_t channel)
 | 
				
			|||||||
        case EraseCode::ResetAP:
 | 
					        case EraseCode::ResetAP:
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER)
 | 
					            // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER)
 | 
				
			||||||
            println("ResetAP requested.");
 | 
					            println("ResetAP requested. Not implemented yet.");
 | 
				
			||||||
            return successCode;
 | 
					            return successCode;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        case EraseCode::ResetIA:
 | 
					        case EraseCode::ResetIA:
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER)
 | 
					            // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER)
 | 
				
			||||||
            println("ResetAP requested.");
 | 
					            println("ResetAP requested. Not implemented yet.");
 | 
				
			||||||
            return successCode;
 | 
					            return successCode;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        case EraseCode::ResetLinks:
 | 
					        case EraseCode::ResetLinks:
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER)
 | 
					            // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER)
 | 
				
			||||||
            println("ResetLinks requested.");
 | 
					            println("ResetLinks requested. Not implemented yet.");
 | 
				
			||||||
            return successCode;
 | 
					            return successCode;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        case EraseCode::ResetParam:
 | 
					        case EraseCode::ResetParam:
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER)
 | 
					            // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER)
 | 
				
			||||||
            println("ResetParam requested.");
 | 
					            println("ResetParam requested. Not implemented yet.");
 | 
				
			||||||
            return successCode;
 | 
					            return successCode;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        case EraseCode::FactoryReset:
 | 
					        case EraseCode::FactoryReset:
 | 
				
			||||||
        case EraseCode::FactoryResetWithoutIA:
 | 
					        case EraseCode::FactoryResetWithoutIA:
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER)
 | 
					            // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER)
 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef USE_DATASECURE
 | 
					 | 
				
			||||||
            print("Factory reset requested. type: ");
 | 
					            print("Factory reset requested. type: ");
 | 
				
			||||||
            println(eraseCode == EraseCode::FactoryReset ? "FactoryReset with IA" : "FactoryReset without IA");
 | 
					            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
 | 
					            // If erase code is FactoryReset or FactoryResetWithoutIA, set FDSK as toolkey again
 | 
				
			||||||
            // and disable security mode
 | 
					            // and disable security mode
 | 
				
			||||||
            _secIfObj.factoryReset();
 | 
					            _secIfObj.factoryReset();
 | 
				
			||||||
 | 
				
			|||||||
@ -9,7 +9,7 @@
 | 
				
			|||||||
#include "callback_property.h"
 | 
					#include "callback_property.h"
 | 
				
			||||||
#include "function_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 };
 | 
					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::_secReport[] = { 0x00, 0x00, 0x00 };
 | 
				
			||||||
uint8_t SecurityInterfaceObject::_secReportCtrl[] = { 0x00, 0x00, 0x00 };
 | 
					uint8_t SecurityInterfaceObject::_secReportCtrl[] = { 0x00, 0x00, 0x00 };
 | 
				
			||||||
@ -316,6 +316,7 @@ void SecurityInterfaceObject::errorCode(ErrorCode errorCode)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void SecurityInterfaceObject::factoryReset()
 | 
					void SecurityInterfaceObject::factoryReset()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    println("Factory reset of security interface object requested.");
 | 
				
			||||||
    _secAppLayer->setSecurityMode(false);
 | 
					    _secAppLayer->setSecurityMode(false);
 | 
				
			||||||
    property(PID_TOOL_KEY)->write(1, 1, _fdsk);
 | 
					    property(PID_TOOL_KEY)->write(1, 1, _fdsk);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user