Skip to content

Servomotor v0.10.0 — variable-length replies (breaking)

Choose a tag to compare

@tomrodinger tomrodinger released this 30 Jul 08:02
· 3 commits to main since this release

⚠️ This release contains breaking API changes

Three methods changed signature

getProductDescription(), captureHallSensorData() and readMultipurposeBuffer() now take a
caller-owned buffer:

void getProductDescription(char* buffer, uint16_t bufferSize, uint16_t* actualSize);

Previously each returned a fixed one-byte struct, which silently truncated every variable-length
reply — you could not actually read a product description or a hall-sensor capture. They now return
the full reply, and report through actualSize how many bytes arrived.

Sketches that call any of those three need updating.

Bug fixes

  • getCurrentTime() and timeSync() were wrong by a factor of 32. The wire unit for these two
    commands is microseconds, and the conversion did not account for it. Any code that read the
    motor's clock, or synchronised several motors, was getting values 32× off.
  • Default units now match the Python library. Current defaults to internal current units, and
    voltage defaults to volts. Previously the two libraries disagreed, so the same program written
    against each produced different numbers.