From 9e25cbb18344ec11c514d9a2a13953c7b4f38324 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Mon, 5 May 2025 21:02:17 +0200 Subject: [PATCH] apps/aqhome-tool/flash: shorten re-send time --- apps/aqhome-tool/nodes/flash.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/aqhome-tool/nodes/flash.c b/apps/aqhome-tool/nodes/flash.c index 29ca336..c2b3412 100644 --- a/apps/aqhome-tool/nodes/flash.c +++ b/apps/aqhome-tool/nodes/flash.c @@ -46,11 +46,12 @@ #define A_INT GWEN_ArgsType_Int -#define FLASH_TOOL_PAGESIZE 16 +#define FLASH_TOOL_PAGESIZE 16 -#define FLASH_TOOL_MAX_REPEAT 16 -#define FLASH_TOOL_DEFAULT_TIMEOUTINSECS 5 -#define FLASH_TOOL_WAITFORFLASHREADY_INSECS 30 +#define FLASH_TOOL_MAX_REPEAT 16 +#define FLASH_TOOL_DEFAULT_TIMEOUTINSECS 5 +#define FLASH_TOOL_WAITFORFLASHREADY_INSECS 30 +#define FLASH_TOOL_WAITFORFLASHRESPONSE_SECS 2 @@ -306,7 +307,6 @@ int _flashRecord(AQH_OBJECT *o, int rv; uint32_t sendLen; -// usleep(100000); sendLen=(len>pageSize)?pageSize:len; fprintf(stdout, " - sending page: addr=%04x, len=%d (%d bytes left)\n", address, sendLen, len); // GWEN_Text_DumpString((const char*)ptr, sendLen, 5); @@ -387,7 +387,7 @@ int _trySendMsgAndWaitForFlashResponse(AQH_OBJECT *o, AQH_MESSAGE *msg, const ch nodeMsg=AQH_Message_dup(msg); DBG_INFO(NULL, "Sending %s message (%d)", msgInfo, i); AQH_ToolClient_SendNodeMsg(o, nodeMsg); - rv=_waitForFlashResponse(o, timeoutInSeconds); + rv=_waitForFlashResponse(o, FLASH_TOOL_WAITFORFLASHRESPONSE_SECS); if (rv==0) { AQH_Message_free(msg); return 0;