diff --git a/apps/examples/Make.defs b/apps/examples/Make.defs index 1c61513844..3d95ccb16d 100644 --- a/apps/examples/Make.defs +++ b/apps/examples/Make.defs @@ -106,6 +106,10 @@ ifeq ($(CONFIG_EXAMPLES_MM),y) CONFIGURED_APPS += examples/mm endif +ifeq ($(CONFIG_EXAMPLES_MODBUS),y) +CONFIGURED_APPS += examples/modbus +endif + ifeq ($(CONFIG_EXAMPLES_MOUNT),y) CONFIGURED_APPS += examples/mount endif diff --git a/apps/modbus/mb.c b/apps/modbus/mb.c index 209b1274ca..8417d12749 100644 --- a/apps/modbus/mb.c +++ b/apps/modbus/mb.c @@ -399,10 +399,12 @@ eMBPoll( void ) ucMBFrame[usLength++] = ( uint8_t )( ucFunctionCode | MB_FUNC_ERROR ); ucMBFrame[usLength++] = eException; } +#ifdef CONFIG_MB_ASCII_ENABLED if( ( eMBCurrentMode == MB_ASCII ) && CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS ) { vMBPortTimersDelay( CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS ); - } + } +#endif eStatus = peMBFrameSendCur( ucMBAddress, ucMBFrame, usLength ); } break;