Why are negative module positions sometimes 255, 254, etc.? | Intech Studio
💬 general Grid

Why are negative module positions sometimes 255, 254, etc.?

mvdirty
mvdirty · · 4 replies

Early in learning to program grid modules I found that I needed extra logic to work with module position x and y values like 255, 254, etc. but then after some changes to my code it stopped being necessary as I was directly receiving -1 etc. Then yet more recently, after moving code around and maybe a firmware update, I started seeing 255 again and had to re-implement my conversion code.

I would personally expect negative values in all scenarios, and to never see 255.

This suggests to me that either this is varying across firmware versions and/or it is varying across module_position_[xy] call sites/scenarios.

Is the current mixed behavior expected? If so, why, and where should I expect to receive negative values versus 255, 254, etc.?

Replies (4)

mvdirty mvdirty ·

Bumping after a week with no response.

kkerti kkerti ·

As on a descartes coordinate system, where USB connected Grid modules is [0,0], you should get -1, -2 etc values - at least that was the case I think in previous FW versions.

kkerti kkerti ·

https://github.com/intechstudio/grid-fw/issues/166
This again added as a new issue, might be related to the other one.

mvdirty mvdirty ·

Thanks for opening that one!

Discord

View on Discord

This post is from the Intech Studio Discord community.

Open thread →