libmodbuspp icon indicating copy to clipboard operation
libmodbuspp copied to clipboard

[BUG] Byte order mismatch

Open maxlein opened this issue 3 years ago • 0 comments

When I start a server with this config, and read registers out like that:

Modbus::Data<float, Modbus::EndianBigLittle> values[4];  // is cdab order

if (slave->readRegisters (1, values, 4) > 0)  
... 

Then I get wrong data.
Only if I use EndianLittleBig, I get correct results.

maxlein avatar Apr 24 '21 17:04 maxlein