You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constnormalizeAngle=(angle)=>{if(angle>=180){returnangle-(360*((angle+180)/360));}elseif(angle<-180){returnangle+(360*((180-angle)/360));}returnangle;};// remove (360 / 360) from equationconstnormalizeAngle1=(angle)=>{if(angle>=180){returnangle-(((angle+180)));}elseif(angle<-180){returnangle+(((180-angle)));}returnangle;};// remove (angle - angle) from equationconstnormalizeAngle2=(angle)=>{if(angle>=180){return-180;}elseif(angle<-180){return180;}returnangle;};for(leta=-400;a<400;a=a+10){console.log([a,normalizeAngle(a),normalizeAngle1(a),normalizeAngle2(a)])}
Would you consider opening up Discussions?. I am looking for help using the Technic Large Motor to steer the off road buggy - but don't want to clutter up Issues with non-bugs.
I used this library to make a web page to control kid's duplo train a few years ago, and it's still kicking. Just updated your lib from 1.x => 8.x. So thanks!
The text was updated successfully, but these errors were encountered:
I ran into trouble controlling a Technic Large Motor; while struggling to reset zero angle, and absolutely rotate to a desired angle, i found:
I do not think
Tachomotor
rotateByDegrees
should allow a negative number fordegrees
aswriteUInt32LE
will yield unexpected results.node-poweredup/src/devices/tachomotor.ts
Line 157 in e4c68e5
I am not sure what
normalizeAngle
does, but it contains a bunch of math that eventually just cancels out.node-poweredup/src/utils.ts
Line 36 in e4c68e5
Would you consider opening up Discussions?. I am looking for help using the Technic Large Motor to steer the off road buggy - but don't want to clutter up Issues with non-bugs.
I used this library to make a web page to control kid's duplo train a few years ago, and it's still kicking. Just updated your lib from 1.x => 8.x. So thanks!
The text was updated successfully, but these errors were encountered: