Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Ruggeduino overrides pinmodes at initialisation #882

Open
WillB97 opened this issue Feb 7, 2023 · 4 comments
Open

Ruggeduino overrides pinmodes at initialisation #882

WillB97 opened this issue Feb 7, 2023 · 4 comments
Labels
semver-major This change requires an increment in the manor version number wontfix This will not be worked on

Comments

@WillB97
Copy link
Contributor

WillB97 commented Feb 7, 2023

This causes pin modes set in the setup() routine in the ruggeduino to be overriden.

for pin_number in self._digital_pins.keys():
self.set_gpio_pin_mode(pin_number, GPIOPinMode.DIGITAL_INPUT)

@trickeydan
Copy link
Contributor

This is intentional behaviour to ensure that the modes in Python match the modes on the Ruggeduino.

@trickeydan trickeydan added the wontfix This will not be worked on label Feb 8, 2023
@WillB97
Copy link
Contributor Author

WillB97 commented Feb 8, 2023

This currently silently breaks the code of every student who follows an arduino guide as the recommended code layout is to configure the pinmodes in the setup. This is then overridden by j5.

@trickeydan
Copy link
Contributor

Then we need to update the docs. This is how the old sr API behaved also, so I'm surprised it's gone unnoticed for this long.

@trickeydan
Copy link
Contributor

Additionally, there are possibly teams who are relying on this behaviour as we document the initial pin modes.

So at the very least, we can't change this until SR2024

@trickeydan trickeydan added the semver-major This change requires an increment in the manor version number label Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
semver-major This change requires an increment in the manor version number wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants