alejoseb / Modbus-STM32-HAL-FreeRTOS

Modbus TCP and RTU, Master and Slave for STM32 using Cube HAL and FreeRTOS
GNU Lesser General Public License v2.1
579 stars 192 forks source link

Update Modbus.h to use hexadecimal function codes #96

Closed LabtronicsDesign closed 9 months ago

LabtronicsDesign commented 9 months ago

Issue with master sending out 0x10 instead of 0x16 when using a MB_FC_WRITE_MULTIPLE_REGISTERS. Issue traced back to assigning function codes as decimals instead of hexadecimal.

This has been tested successful using STM32U5 on a custom project.

alejoseb commented 9 months ago

This change is incorrect and unnecessary.