From 7688c6c4db20e008e39f8be5126499907eaf3aa7 Mon Sep 17 00:00:00 2001 From: SenySunny <460135301@qq.com> Date: Tue, 6 Feb 2024 14:43:49 +0800 Subject: [PATCH] fix abug --- package/modbus_rt/_modbus_rt_rtu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package/modbus_rt/_modbus_rt_rtu.c b/package/modbus_rt/_modbus_rt_rtu.c index 6384f0053..f476c0b7e 100644 --- a/package/modbus_rt/_modbus_rt_rtu.c +++ b/package/modbus_rt/_modbus_rt_rtu.c @@ -88,7 +88,7 @@ int _modbus_rt__rtu__set_over_type(PikaObj *self, int over_type) { pika_platform_printf("modbus rtu is not activated.\n"); return 0; #elif (!MODBUS_SERIAL_OVER_TCP_ENABLE) && (!MODBUS_SERIAL_OVER_UDP_ENABLE) - pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n", ret); + pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n"); return 0; #else int ret = 0; @@ -120,7 +120,7 @@ int _modbus_rt__rtu__set_net(PikaObj *self, char* ip, int port, int type) { pika_platform_printf("modbus rtu is not activated.\n"); return 0; #elif (!MODBUS_SERIAL_OVER_TCP_ENABLE) && (!MODBUS_SERIAL_OVER_UDP_ENABLE) - pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n", ret); + pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n"); return 0; #else int ret = 0; @@ -151,7 +151,7 @@ int _modbus_rt__rtu__set_ip(PikaObj *self, char* ip) { pika_platform_printf("modbus rtu is not activated.\n"); return 0; #elif (!MODBUS_SERIAL_OVER_TCP_ENABLE) && (!MODBUS_SERIAL_OVER_UDP_ENABLE) - pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n", ret); + pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n"); return 0; #else int ret = 0; @@ -182,7 +182,7 @@ int _modbus_rt__rtu__set_port(PikaObj *self, int port) { pika_platform_printf("modbus rtu is not activated.\n"); return 0; #elif (!MODBUS_SERIAL_OVER_TCP_ENABLE) && (!MODBUS_SERIAL_OVER_UDP_ENABLE) - pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n", ret); + pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n"); return 0; #else int ret = 0; @@ -213,7 +213,7 @@ int _modbus_rt__rtu__set_type(PikaObj *self, int type) { pika_platform_printf("modbus rtu is not activated.\n"); return 0; #elif (!MODBUS_SERIAL_OVER_TCP_ENABLE) && (!MODBUS_SERIAL_OVER_UDP_ENABLE) - pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n", ret); + pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n"); return 0; #else int ret = 0; @@ -586,7 +586,7 @@ int _modbus_rt__rtu__master_set_server(PikaObj *self, char* saddr, int sport) { pika_platform_printf("modbus rtu is not activated.\n"); return 0; #elif (!MODBUS_SERIAL_OVER_TCP_ENABLE) && (!MODBUS_SERIAL_OVER_UDP_ENABLE) - pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n", ret); + pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n"); return 0; #else int ret = 0; @@ -613,7 +613,7 @@ char* _modbus_rt__rtu__master_get_saddr(PikaObj *self) { pika_platform_printf("modbus rtu is not activated.\n"); return NULL; #elif (!MODBUS_SERIAL_OVER_TCP_ENABLE) && (!MODBUS_SERIAL_OVER_UDP_ENABLE) - pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n", ret); + pika_platform_printf("modbus_rtu_set_over_type error, MODBUS_SERIAL_OVER_XXX_ENABLE is not ENABLE.\n"); return NULL; #else int ret = 0;