Title: Using the pyControl API to interface with the PC · pyControl · Discussion #124 · GitHub
Open Graph Title: Using the pyControl API to interface with the PC · pyControl · Discussion #124
X Title: Using the pyControl API to interface with the PC · pyControl · Discussion #124
Description: Using the pyControl API to interface with the PC
Open Graph Description: Hello everyone, I'm am working on rather experiments so my task files have gotten quite long. I've hit a problem where I am unable to add much code because the board runs out of memory when loading...
X Description: Hello everyone, I'm am working on rather experiments so my task files have gotten quite long. I've hit a problem where I am unable to add much code because the board runs out of memory when...
Opengraph URL: https://github.com/orgs/pyControl/discussions/124
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Using the pyControl API to interface with the PC","text":"Hello everyone,
\nI'm am working on rather experiments so my task files have gotten quite long. I've hit a problem where I am unable to add much code because the board runs out of memory when loading the task on to it,
\nMy problem is with a variable validation function that i want to add to make sure they are correctly set before running the task.
\nI want to use the API to offload that validation to the PC however i have not been able to understand how to do it from the example file.
\nDo I manually run a script on the PC that listens to a port or is there a way for pyControl to manage it?
\nOr maybe I can skip using an API and add memory to the board?
\nThanks!
","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"The API script can only act upon changes to the task variables after they have been made, instead we would like to prevent setting/changing the variable in the first place if it is invalid.
\nI have created an example for you that uses a custom controls dialog. Download and unzip validation_v1.zip. Place the input_validation.py in your tasks/ folder and place validation_gui.py in your controls_dialogs/ folder.
\nHope that is enough to get you started. Let me know if you have questions!
\n\n \n \n CleanShot.2024-07-16.at.12.28.15.mp4\n \n
\n\n \n\n","upvoteCount":0,"url":"https://github.com/orgs/pyControl/discussions/124#discussioncomment-10064662"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/orgs/:org/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:684476d5-8019-75e7-cab9-4eb08eb0bef2 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | 9044:16CF0C:8966D:BCB25:698EE703 |
| html-safe-nonce | a5ca541cedc8bb4d7c1bbe1a360991faa9d70d21c940bf07cbb3997f6a223671 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDQ0OjE2Q0YwQzo4OTY2RDpCQ0IyNTo2OThFRTcwMyIsInZpc2l0b3JfaWQiOiIyMjUzOTIwNzU2MjA2MzMxNjUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1f58352cb50d633a9c1db5c37224a52ac5d05fa2195b4e8e7fa0e270bc44558f |
| hovercard-subject-tag | discussion:6937300 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/orgs/pyControl/124/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/b2d46fd146c388c28e74450fed135e5ec1a38b2fb777e914e2f333463b1136aa/orgs/pyControl/discussions/124 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b2d46fd146c388c28e74450fed135e5ec1a38b2fb777e914e2f333463b1136aa/orgs/pyControl/discussions/124 |
| og:image:alt | Hello everyone, I'm am working on rather experiments so my task files have gotten quite long. I've hit a problem where I am unable to add much code because the board runs out of memory when loading... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba |
| turbo-cache-control | no-preview |
| octolytics-dimension-user_id | 58780920 |
| octolytics-dimension-user_login | pyControl |
| octolytics-dimension-repository_id | 219033872 |
| octolytics-dimension-repository_nwo | pyControl/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 219033872 |
| octolytics-dimension-repository_network_root_nwo | pyControl/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6b91a7e6e46287d26887e3fb7a4161657bab8f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width