Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

'encoderValue' (shape: 1):  23563414
'timing' (shape: 1):  505870
'scale' (shape: 1):  1
'scaleDenom' (shape: 1): 150
'mode' (shape: 1):  0
'error' (shape: 1):  0
'majorVersion' (shape: 1):  2
'minorVersion' (shape: 1):  0
'microVersion' (shape: 1):  0

See the definitions of encoder_header_t and encoder_channel_t in github: UdpEncoder.hh

Zach writes:

...if the denominator is used, we do no pre or post multiplication of the values. If I need to express something like numerator = 1.16 and denominator = 5.0, I would send 116 and 500 which maintains the same ratio as the original.

In the specific case of this encoder, I send 1 and 150 exactly and your code on the other side simply doesn’t do the *1e-6 step because a denominator is present.

...