pybricks / support

Pybricks support and general discussion
MIT License
109 stars 7 forks source link

[Bug] PrimeHub/InventorHub: hub.display.image(...) argument mismatch b/w firmware & documented API #409

Closed TheVinhLuong102 closed 2 years ago

TheVinhLuong102 commented 3 years ago

Hi @laurensvalk, @dlech,

For the PrimeHub/InventorHub, the method .display.image(...)'s argument name in the documented API is matrix=..., but the underlying firmware accepts image=... instead.

Vinh

dlech commented 3 years ago

Off topic: Can we save the @ mentions for when you really need to get our attention (like if it has been 3 or 4 weeks and we haven't responded - or you have a specific question for a specific person)? Each time we are @ mentioned, it creates an extra notification.

TheVinhLuong102 commented 3 years ago

Ok noted David! 👍

dlech commented 3 years ago

Thanks :smile:

laurensvalk commented 3 years ago

Since the Prime Hub isn't part of a release yet, we still have some flexibility to reconsider the API.

We've currently grouped the "images" under pybricks.parameters.Icon, so it's currently like this:

hub.display.image(Icon.HAPPY)

I called them icons because at 5x5 pixels it's a bit of a stretch to call them images.

So another option that could make sense is

hub.display.icon(Icon.HAPPY)
TheVinhLuong102 commented 3 years ago

Laurens,

Yes I think "Icon" / "icon" sounds great. It's better to settle on one way to call these -- especially for young users -- instead of having "icon" + "image" + "matrix" :)

Vinh

laurensvalk commented 2 years ago

So another option that could make sense is

   hub.display.icon(Icon.HAPPY)

This is done. Thanks @TheVinhLuong102!