We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7616d9a commit be7ccdaCopy full SHA for be7ccda
types.go
@@ -142,6 +142,11 @@ func NewDefaultHandler(
142
rightLimitAngle = actuationRange
143
}
144
145
+ // If the direction is inverted, swap the left and right limit angles
146
+ if isDirectionInverted {
147
+ leftLimitAngle, rightLimitAngle = actuationRange - rightLimitAngle, actuationRange - leftLimitAngle
148
+ }
149
+
150
// Initialize the servo with the provided parameters
151
handler := &DefaultHandler{
152
afterSetAngleFunc: afterSetAngleFunc,
0 commit comments