Title: Add optional argument to onRun · Issue #27 · ivanseidel/ArduinoThread · GitHub
Open Graph Title: Add optional argument to onRun · Issue #27 · ivanseidel/ArduinoThread
X Title: Add optional argument to onRun · Issue #27 · ivanseidel/ArduinoThread
Description: It would be great to be able to add an optional void (*arg) argument to onRun and have that passed to your callback. (poorly written) example void shutoff(void (*arg)) { uint8_t *pin = (uint8_t*)arg; digitalWrite(pin, LOW); } void setup(...
Open Graph Description: It would be great to be able to add an optional void (*arg) argument to onRun and have that passed to your callback. (poorly written) example void shutoff(void (*arg)) { uint8_t *pin = (uint8_t*)ar...
X Description: It would be great to be able to add an optional void (*arg) argument to onRun and have that passed to your callback. (poorly written) example void shutoff(void (*arg)) { uint8_t *pin = (uint8_t*)ar...
Opengraph URL: https://github.com/ivanseidel/ArduinoThread/issues/27
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add optional argument to onRun","articleBody":"It would be great to be able to add an optional `void (*arg)` argument to onRun and have that passed to your callback.\r\n\r\n(poorly written) example\r\n```\r\nvoid shutoff(void (*arg)) {\r\n uint8_t *pin = (uint8_t*)arg;\r\n digitalWrite(pin, LOW);\r\n}\r\n\r\nvoid setup() {\r\n Thread t1 = Thread();\r\n t1.onRun(shutoff, 1);\r\n\r\n Thread t1 = Thread();\r\n t1.onRun(shutoff, 2);\r\n}\r\n```\r\n\r\nThis will dramatically simplify code by not requiring individual callbacks for each thread that perform the same function.","author":{"url":"https://github.com/morganrallen","@type":"Person","name":"morganrallen"},"datePublished":"2017-07-16T20:33:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/27/ArduinoThread/issues/27"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2c255e48-fdda-a1ca-e230-70a2bce9ae63 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D6D6:18C2EF:46E687:5E3FBA:69696E5B |
| html-safe-nonce | 6d904c858f7a48da7151127fed70405eb055efc3faf7ab0a4303f76d46b65d23 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkQ2OjE4QzJFRjo0NkU2ODc6NUUzRkJBOjY5Njk2RTVCIiwidmlzaXRvcl9pZCI6IjEzMTE1NDUyMjcxMjEwOTQyMzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 570d3a0891dd9c52ba67c24cc06bca809dbb93a945ba3ebc1fb4a950ff60a0e1 |
| hovercard-subject-tag | issue:243264505 |
| github-keyboard-shortcuts | repository,issues,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/issues/show/ivanseidel/ArduinoThread/27/issue_layout |
| twitter:image | https://opengraph.githubassets.com/02ca4f2ca6993e38b93e97687ff32342d9d02259472b9ee6b329da2fd7a6cd0c/ivanseidel/ArduinoThread/issues/27 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/02ca4f2ca6993e38b93e97687ff32342d9d02259472b9ee6b329da2fd7a6cd0c/ivanseidel/ArduinoThread/issues/27 |
| og:image:alt | It would be great to be able to add an optional void (*arg) argument to onRun and have that passed to your callback. (poorly written) example void shutoff(void (*arg)) { uint8_t *pin = (uint8_t*)ar... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | morganrallen |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| turbo-cache-control | no-preview |
| go-import | github.com/ivanseidel/ArduinoThread git https://github.com/ivanseidel/ArduinoThread.git |
| octolytics-dimension-user_id | 3102127 |
| octolytics-dimension-user_login | ivanseidel |
| octolytics-dimension-repository_id | 9994728 |
| octolytics-dimension-repository_nwo | ivanseidel/ArduinoThread |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9994728 |
| octolytics-dimension-repository_network_root_nwo | ivanseidel/ArduinoThread |
| 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 | ec4d88fbe7ed62446d90b0a6d8e6db4248a8f8b8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width