aqhome-react: finish new network reading code, improved debugging helper code.

This commit is contained in:
Martin Preuss
2024-04-18 22:40:13 +02:00
parent 2443fbca9f
commit e486a7e69d
11 changed files with 103 additions and 92 deletions

View File

@@ -19,6 +19,8 @@
#include <gwenhywfar/text.h>
#define DEBUG_DRY_RUN 1 /* don't actually set value if "1" */
/* ------------------------------------------------------------------------------------------------
* defines
@@ -98,8 +100,13 @@ void _cbInputData(AQHREACT_UNIT *unit, AQHREACT_PORT *port, const AQHREACT_DATAO
break;
}
if (msgOut) {
#if DEBUG_DRY_RUN
DBG_ERROR(NULL, "Would send data for value \"%s\"", sValueName);
GWEN_Msg_free(msgOut);
#else
DBG_INFO(NULL, "Sending data for value \"%s\"", sValueName);
GWEN_MsgEndpoint_AddSendMessage(brokerEndpoint, msgOut);
#endif
}
}
}