Skip to content

Conversation

@microbit-matt-hillsdon
Copy link
Contributor

@microbit-matt-hillsdon microbit-matt-hillsdon commented Oct 4, 2022

Addresses the servo scenario on #76

@netlify
Copy link

netlify bot commented Oct 4, 2022

Deploy Preview for distracted-dubinsky-fd8a42 ready!

Name Link
🔨 Latest commit 9170221
🔍 Latest deploy log https://app.netlify.com/sites/distracted-dubinsky-fd8a42/deploys/633c506362b3c8000847e12c
😎 Deploy Preview https://deploy-preview-79--distracted-dubinsky-fd8a42.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

// attempt to configure the pin in analog-out mode by calling setAnalogValue.
if ((ErrorCode)pin_obj[pin]->getAnalogPeriodUs() == DEVICE_NOT_SUPPORTED) {
if (pin_obj[pin]->setAnalogValue(0) != DEVICE_OK) {
return -1;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No matter what I do I can't get this or the error branch below to trigger on a V2 device. So for now, the simulator calls always succeed.

@dpgeorge do you know how I can trigger these error branches?

Link to easier to read version: https://github.com/microbit-foundation/micropython-microbit-v2/blob/e4321a866e3f8ef48a7f5b5e96db99cc39b09757/src/codal_app/microbithal.cpp#L155

@microbit-matt-hillsdon
Copy link
Contributor Author

Main risk for review is probably that I'll break the existing pin support.

Copy link
Contributor

@microbit-robert microbit-robert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Fixes associated issue and doesn't negatively impact existing pin support.

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit b9f4557 into main Oct 4, 2022
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the pin-period branch October 4, 2022 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants