AllenNeuralDynamics / harp.device.treadmill

a Harp-compatible device for controlling an instrumented mouse treadmill
1 stars 0 forks source link

Mismatch between device.yml and firmware register #17

Closed tiffanyona closed 1 month ago

tiffanyona commented 1 month ago

It returns the following error: "

ValueError: expected payload type uint32 but got uint16

The device.yml is directly recovered from the online repo.

bruno-f-cruz commented 1 month ago

It seems that, at least, register 36 has a mismatched specification between firmware and device.yml:

https://github.com/AllenNeuralDynamics/harp.device.treadmill/blob/b7336e21694228171e727ed7c736bfe144d2b387/software/bonsai/device.yml#L37-L39

and

https://github.com/AllenNeuralDynamics/harp.device.treadmill/blob/b7336e21694228171e727ed7c736bfe144d2b387/firmware/src/main.cpp#L85

This mismatch has likely resulted from a previous discussion (see here https://github.com/AllenNeuralDynamics/harp.device.treadmill/issues/15#issuecomment-1981655986).

I think this probably warrants revisiting in the context of a more holistic solution where we derive the register header from the device.yml as we recently discussed @Poofjunior. Meanwhile, do you want to keep it a 32 or a 16bit value @Poofjunior ?

Poofjunior commented 1 month ago

Let's keep it as a U16. No need to make it any bigger than it needs to be.