billvaglienti / ProtoGen

Communications protocol generation software
MIT License
30 stars 16 forks source link

Fixed string is decoded as variable string #86

Closed AppliedNav closed 5 years ago

AppliedNav commented 5 years ago

A data tag defined as: Data name="model" inMemoryType="fixedstring" array="16" comment="IMU model" generates the following encode instruction: stringToBytes(_pg_user->model, _pg_data, &_pg_byteindex, 16, 1); and the following decode instruction: stringFromBytes(_pg_user->model, _pg_data, &_pg_byteindex, 16, 0); I believe that the last argument in the decode should be a "1" instead of a "0" such that the byte counter is incremented by the exact length of the string bytes.

billvaglienti commented 5 years ago

Fixed in 2.16.b