aqhome: increased verbosity

This commit is contained in:
Martin Preuss
2023-04-20 23:58:29 +02:00
parent 02b934c080
commit 73404d79f6

View File

@@ -39,6 +39,8 @@
#define FLASH_TOOL_MAX_REPEAT 16
#define DEBUG_FLASH
static int _doFlash(GWEN_DB_NODE *dbArgs);
static GWEN_MSG *_waitForFlashReadyMessageForUid(GWEN_MSG_ENDPOINT_MGR *emgr, GWEN_MSG_ENDPOINT *epTcp,
@@ -246,6 +248,7 @@ int _doFlash(GWEN_DB_NODE *dbArgs)
while(flashRecord) {
int rv;
DBG_ERROR(NULL, "Sending flash record at %08x", AQH_FlashRecord_GetAddress(flashRecord));
rv=_sendFlashData(emgr, epTcp, flashRecord, pageSize, timeoutInSeconds);
if (rv!=0) {
DBG_ERROR(NULL, "Error sending flash data (%d)", rv);
@@ -351,6 +354,11 @@ int _sendFlashData(GWEN_MSG_ENDPOINT_MGR *emgr,
GWEN_MSG *msgOut;
int rv;
#ifdef DEBUG_FLASH
DBG_ERROR(NULL, " Sending message: addr=%04x, data len=%d, pagesize=%d", address, sendLen, pageSize);
GWEN_Text_LogString((const char*) ptr, sendLen, NULL, GWEN_LoggerLevel_Error);
#endif
msgNode=AQH_FlashDataMsg_new(0, 0xc1, AQH_MSG_TYPE_FLASH_DATA, address, ptr, sendLen);
if (msgNode==NULL) {
DBG_ERROR(NULL, "Error creating message");