René's URL Explorer Experiment


Title: set_polar() vs set_position() · Issue #16 · uArm-Developer/SwiftProForArduino · GitHub

Open Graph Title: set_polar() vs set_position() · Issue #16 · uArm-Developer/SwiftProForArduino

X Title: set_polar() vs set_position() · Issue #16 · uArm-Developer/SwiftProForArduino

Description: Wondering why the speed on these two functions are different. set_position has much quicker capabilities. The source for set_polar() shows: `static enum uarm_protocol_e uarm_cmd_g2201(char *payload){ //

Open Graph Description: Wondering why the speed on these two functions are different. set_position has much quicker capabilities. The source for set_polar() shows: `static enum uarm_protocol_e uarm_cmd_g2201(char *payload...

X Description: Wondering why the speed on these two functions are different. set_position has much quicker capabilities. The source for set_polar() shows: `static enum uarm_protocol_e uarm_cmd_g2201(char *payload...

Opengraph URL: https://github.com/uArm-Developer/SwiftProForArduino/issues/16

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"set_polar() vs set_position()","articleBody":"Wondering why the speed on these two functions are different. set_position has much quicker capabilities. The source for set_polar() shows: \r\n`static enum uarm_protocol_e uarm_cmd_g2201(char *payload){\t\t\t\t\t\t// \u003c! polar coord\r\n\tuint8_t rtn = 0;\r\n\tchar s_str[10], r_str[10], h_str[10], f_str[10];\r\n\tif( rtn = sscanf(payload, \"S%[0-9-+.]R%[0-9-+.]H%[0-9-+.]F%[0-9-+.]\", s_str, r_str, h_str, f_str) \u003c 4 ){\r\n\t\tDB_PRINT_STR( \"sscanf %d\\r\\n\", rtn );\r\n\t\treturn UARM_CMD_ERROR;\t\t\r\n\t}else{\r\n\t\tfloat length = 0, angle = 0, high = 0, speed = 0;\r\n\t\tfloat target[3] = {0};\r\n\t\tif( !read_float(s_str, NULL, \u0026length) ){ return false; }\r\n\t\tif( !read_float(r_str, NULL, \u0026angle) ){ return false; }\r\n\t\tif( !read_float(h_str, NULL, \u0026high) ){ return false; }\r\n\t\tif( !read_float(f_str, NULL, \u0026speed) ){ return false; }\r\n\r\n\t\tangle = (angle - 90.0) / RAD_TO_DEG;\t\r\n\t\ttarget[X_AXIS] = length * cos(angle); \r\n\t\ttarget[Y_AXIS] = length * sin(angle);\r\n\t\ttarget[Z_AXIS] = high; \t\t\r\n\r\n\t\treturn mc_line( 1, target, speed, false );\r\n\t}\r\n}\r\n\r\nand source for set_position()\r\n`static enum uarm_protocol_e uarm_cmd_g2204(char *payload){\t\t\t\t\t// \u003c! coord offset \r\n\tuint8_t rtn = 0;\r\n\tchar x_str[10], y_str[10], z_str[10], f_str[10];\r\n\tif( rtn = sscanf(payload, \"X%[0-9-+.]Y%[0-9-+.]Z%[0-9-+.]F%[0-9-+.]\", x_str, y_str, z_str, f_str ) \u003c 4 ){\r\n\t\tDB_PRINT_STR( \"sscanf %d\\r\\n\", rtn );\r\n\t\treturn UARM_CMD_ERROR;\r\n\t}else{\r\n\t\tfloat x = 0, y = 0, z = 0, speed = 0;\r\n\t\tfloat target[3];\r\n\t\tif( !read_float(x_str, NULL, \u0026x) ){ return false; }\r\n\t\tif( !read_float(y_str, NULL, \u0026y) ){ return false; }\r\n\t\tif( !read_float(z_str, NULL, \u0026z) ){ return false; }\r\n\t\tif( !read_float(f_str, NULL, \u0026speed) ){ return false; }\r\n\r\n\t\tstep_to_coord( uarm.target_step[X_AXIS], uarm.target_step[Y_AXIS], uarm.target_step[Z_AXIS], \r\n\t\t\t\t\t\t\t\t\t \u0026target[X_AXIS], \u0026target[Y_AXIS], \u0026target[Z_AXIS] );\r\n\t\tcoord_arm2effect( \u0026target[X_AXIS], \u0026target[Y_AXIS], \u0026target[Z_AXIS] );\r\n\t\ttarget[X_AXIS] += x;\r\n\t\ttarget[Y_AXIS] += y;\r\n\t\ttarget[Z_AXIS] += z;\r\n\r\n\t\treturn mc_line( 1 , target, speed, false );\r\n\t}\r\n}\r\n\r\nNot the greatest at this trig, but i diffed it and found that it ends up decrementing and incrementing on the other while calling these two calculation functions:\r\nvoid coord_arm2effect(float *x, float *y, float *z){\r\n\tfloat anglec;\r\n\r\n\tif( *x == 0 ){\r\n\t\tif(*y \u003e 0){\r\n\t\t\tanglec = 90 / RAD_TO_DEG;\r\n\t\t}else{\r\n\t\t\tanglec = -90 / RAD_TO_DEG;\r\n\t\t}\r\n\t}else if(*x \u003c 0){\r\n\t\tanglec = NAN;\t// \u003c! cann't arrive\r\n\t}else{\r\n\t\tanglec = atan(*y / *x);\r\n\t}\t\r\n\r\n\t*x += uarm.param.front_offset * cos(anglec); \r\n\t*y += uarm.param.front_offset * sin(anglec);\r\n\t*z -= uarm.param.high_offset;\t\r\n\r\n}\r\n\r\nvoid coord_effect2arm(float *x, float *y, float *z){\r\n\tfloat anglec;\r\n\r\n\tif( *x == 0 ){\r\n\t\tif(*y \u003e 0){\r\n\t\t\tanglec = 90 / RAD_TO_DEG;\r\n\t\t}else{\r\n\t\t\tanglec = -90 / RAD_TO_DEG;\r\n\t\t}\r\n\t}else if(*x \u003c 0){\r\n\t\tanglec = NAN;\t// \u003c! cann't arrive\r\n\t}else{\r\n\t\tanglec = atan(*y / *x);\r\n\t}\t\r\n\r\n\t*x -= uarm.param.front_offset * cos(anglec); \r\n\t*y -= uarm.param.front_offset * sin(anglec);\r\n\t*z += uarm.param.high_offset;\t\t\r\n}\r\n\r\n`\r\nAny help making set_polar just as fast as set_position?","author":{"url":"https://github.com/P3nguin-M","@type":"Person","name":"P3nguin-M"},"datePublished":"2020-10-09T18:20:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/16/SwiftProForArduino/issues/16"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:10da6be5-5239-f753-9de1-cd186f8de1a7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEC58:2D8AA0:936E63:C56D5F:6977E68F
html-safe-nonce442ebc544b22eacfade67f2e24f79f51e8765a35e79c1ca262e55e4f999f4cab
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzU4OjJEOEFBMDo5MzZFNjM6QzU2RDVGOjY5NzdFNjhGIiwidmlzaXRvcl9pZCI6IjQ0NTQwODg0NTMwMzc0ODM2NjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacec93c3a6c3ca1f248ff39d69bf5654993c27e63f31828b0de0f042dd57917adf
hovercard-subject-tagissue:718339043
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/uArm-Developer/SwiftProForArduino/16/issue_layout
twitter:imagehttps://opengraph.githubassets.com/33a5fe6e08082f883d859582434f44e7800207102d90ca17754d7eb23971591f/uArm-Developer/SwiftProForArduino/issues/16
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/33a5fe6e08082f883d859582434f44e7800207102d90ca17754d7eb23971591f/uArm-Developer/SwiftProForArduino/issues/16
og:image:altWondering why the speed on these two functions are different. set_position has much quicker capabilities. The source for set_polar() shows: `static enum uarm_protocol_e uarm_cmd_g2201(char *payload...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameP3nguin-M
hostnamegithub.com
expected-hostnamegithub.com
None870e7b4ef171b9ec3e0c7f1f5cb9c5a5c1d1899865e861b49008c3f435fc1c4e
turbo-cache-controlno-preview
go-importgithub.com/uArm-Developer/SwiftProForArduino git https://github.com/uArm-Developer/SwiftProForArduino.git
octolytics-dimension-user_id6229790
octolytics-dimension-user_loginuArm-Developer
octolytics-dimension-repository_id92379761
octolytics-dimension-repository_nwouArm-Developer/SwiftProForArduino
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id92379761
octolytics-dimension-repository_network_root_nwouArm-Developer/SwiftProForArduino
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec3b778ddc3525ff438f1b4bb848d8fd3aaf2e0dd
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/issues/16#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FuArm-Developer%2FSwiftProForArduino%2Fissues%2F16
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FuArm-Developer%2FSwiftProForArduino%2Fissues%2F16
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=uArm-Developer%2FSwiftProForArduino
Reloadhttps://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/issues/16
Reloadhttps://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/issues/16
Reloadhttps://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/issues/16
uArm-Developer https://patch-diff.githubusercontent.com/uArm-Developer
SwiftProForArduinohttps://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FuArm-Developer%2FSwiftProForArduino
Fork 48 https://patch-diff.githubusercontent.com/login?return_to=%2FuArm-Developer%2FSwiftProForArduino
Star 75 https://patch-diff.githubusercontent.com/login?return_to=%2FuArm-Developer%2FSwiftProForArduino
Code https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino
Issues 8 https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/issues
Pull requests 1 https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/pulls
Actions https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/actions
Projects 0 https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/projects
Wiki https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/wiki
Security 0 https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/security
Insights https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/pulse
Code https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino
Issues https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/issues
Pull requests https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/pulls
Actions https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/actions
Projects https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/projects
Wiki https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/wiki
Security https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/security
Insights https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/uArm-Developer/SwiftProForArduino/issues/16
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/uArm-Developer/SwiftProForArduino/issues/16
set_polar() vs set_position()https://patch-diff.githubusercontent.com/uArm-Developer/SwiftProForArduino/issues/16#top
https://github.com/P3nguin-M
https://github.com/P3nguin-M
P3nguin-Mhttps://github.com/P3nguin-M
on Oct 9, 2020https://github.com/uArm-Developer/SwiftProForArduino/issues/16#issue-718339043
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.