Servo Methods
Comments
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
$
%
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABAC
1
fixednameparameters
return type
resolutioncomments (GroG)comments (kwatters)comments (moz4r)Calamity
2
addIKServoEventListener
(NameProvider service)voidServos should not know about IK - but more data can be added to the ServoEvent
ik service publishes an array of servo angles to move to.. how do we want to handle this? seems like the servo needs some "on" methods, the IK service doesn't know about servos.. but it needs to publish a servoEvent ?
3
addServoEventListener(NameProvider service)voidok
4
Xattach()void
marked as deprecated - uses correct method internally
is deprecatedwe should support this and allow users to have setController
5
Xattach(int pin)void
marked as deprecated - uses correct method internally
is deprecatedthis should be ok, if the controller is set ... no?
6
attach(String controllerName, int pin)void
helper methods - allows remote attaching of services by using name value
Attach Pattern ! :)seems good to have
7
attach(String controllerName, Integer pin, Double pos)void
helper methods - allows remote attaching of services by using name value
Attach Pattern ! :)seems better to have!
8
Xattach(Attachable service)voidroutable attach
Attach Pattern ! :) - routable attach method - this is what "User" code uses - it will route to the correct implementation method
does this mean any service that supports attach?
9
attach(ServoController controller, int pin)void
helper methods allow pin to be set
Attach Pattern ! :)yup
10
attach(ServoController controller, int pin, double pos)voidAttach Pattern ! :)yup
11
attach
(ServoController controller, int pin, double pos, double velocity)
voidAttach Pattern ! :)should servos control velocity? or just position? that is the question..
12
attachServoController(ServoController controller)voidAttach Pattern ! :) - type specific attach - this is where the "REAL" implementation isshould depricate and use just attach instead.
13
autoCalibrateSensor()booleanneeds review ???
Servos as a device do not have feedback .. stuff like finger sensors should live in it's own service!
This is used by finger sensors, I will post very soon about it
14
autoCalibrateSensorMax
()intneeds review ???same//
15
autoCalibrateSensorMin
()intneeds review ???same//
16
delayDisable(double delay)voidneeds review ???same//
17
Xdetach()void
Attach Pattern ! :) - You right kwatters ! Good Idea - detach() will be non-deprecated and completely detach from ALL OTHER SERVICES !
cool. should detach the servo and remove it from the arduino device list ? a servo shouldn't need to know what it's attached to in order to detach. i strongly feel we should have servo.detach() and it will detach all attached services.
18
detach(String controllerName)voidAttach Pattern ! :) - the correct way to detach by name
19
detach(Attachable service)voidAttach Pattern ! :) - routable detach method - routes to appropriate implementation
20
detachServoController(ServoController controller)voidAttach Pattern ! :) - where the "REAL" implementation should be for detach
21
disable()voidnew enable/disable for pwm
22
enable()voidnew enable/disable for pwm
23
enable(int pin)voidnew enable/disable for pwmshould depricate, you should set the pin, then enable it.
24
enableAutoAttach(boolean autoAttach)void
should be removed for setAutoEnable(boolean) & setAutoDisable(boolean)
Should be deprecated - I agree with kwatters although the names should be setAutoEnable(True/False) isAutoEnabled()
should depricate and use bean pattern for setters/getters. setAutoAttach(True) / isAutoAttach()
25
enableAutoDetach(boolean autoDetach)void
should be removed for setAutoEnable(boolean) & setAutoDisable(boolean)
Should be deprecatedsee above
26
enableAutoDisable(boolean autoDisable)void
should be removed for setAutoEnable(boolean) & setAutoDisable(boolean)
new enable/disable for pwm - agree with kwatters setAutoDisable(True/False) isAutoDisabledsee above .. setAutoDisable / isAutoDisable
27
enableAutoEnable(boolean autoEnable)void
should be removed for setAutoEnable(boolean) & setAutoDisable(boolean)
new enable/disable for pwm
why do we have auto disable and auto enable?! having both auto enable and disable is very confusing, probably should just be autoEnable .. keep it simple.
some users dont want to use autodisable, but only autoenable . Maybe we can remove autoenable, and set it true by default ? no reason to set autoEnable(False
28
enableSensorFeedback(int torqueInPercent)booleanneeds review ???
if this is for the finger sensor, it should be on it's own service, not on the servo service.
Yes we need to talk about, related to finger sensors
29
eventsEnabled(boolean b)booleanok ? combined with sensor events ?
30
getAcceleration()doubleok
31
getAttached()SetAttach Pattern ! :)
what does this return? a list of attached services? or a list of what this service is attached to?
32
getController()
ServoController
ok
33
getCurrentPos()Doubleok
34
getLastActivityTime()longok
35
getMax()doublegetMax Output or Input ? good question.. ambigious.. depricate
36
getMaxInput()doubleok
37
getMaxOutput()doubleok
38
getMaxVelocity()doubleok
39
getMetaData()
ServiceType
ok
40
getMin()doublegetMin Output or Input ?good question.. ambigious.. depricate
41
getMinInput()doubleok
42
getMinOutput()doubleok
43
getPin()Integerok
44
getPos()doublegetPos vs getCurrentPos ?
servos don't normally have feedback, this should be the position that the servo thinks it's at or where it's moving to..
45
getRest()doubleokok
46
getTargetOutput()doublemmm .. okdepricate ?
47
getVelocity()doubleok
48
isAttached()booleanAttach Pattern ! :) - convienence methodyup
49
isAttached(String name)booleanAttach Pattern ! :)yup
50
isAttachedServoController
(ServoController controller)booleanAttach Pattern ! :)overload just isAttached(ServoController controller) ?
51
isAutoDisabled()booleanok
52
isEnabled()booleanok
53
isEventsEnabled()booleanok
54
isInverted()booleanok
this is confusing to some poeple.. because of the mapping .. if you invert and you have servo mapping.. what does this mean?
55
isMoving()booleanok
not sure we can really return this as true unless velocity is > -1 or we are sweeping..
56
isPinAttached()booleanisn't this the same as isEnabled() ?depricate and use is enabled
57
isSweeping()booleanok
58
map
(double minX, double maxX, double minY, double maxY)
voidok
this should be at the heart of it.. but the question is, how do we support mapping of angles to milliseconds? here's it's just angles to angles..
59
microsecondsToDegree
(int microseconds)doubleconversion methodshould be moved to a static util class or something like that..
60
moveTo(double pos)voidokok..
61
moveToBlocking(double pos)booleanthis should be blocked until stopped event or timeout - why the boolean return ?difficult to properly support methinksThe boolean return true if the moveToBlocking is not breaked by an other thread, that move the servo before the moveToBlocking is finished
62
onIMAngles(Object[] data)voidnot appropriate here
onIMAngles? oh.. maybe integrated movement.. this should be consolidated with the onIKAngles. how ever we want to handle that.
Agree, I made another method to start to avoid breaking ik stuff
63
onRegistered(ServiceInterface s)voidinteresting - on new services, it refreshes controller list
seems like a reasonable part of all services to complete out their lifecycle.. when does this get called?
64
onServoEvent(Double position)voidServo events contain more data - this one does not have enough data
i think having a dynamic gui to listen to the current position of a servo is a very desirable feature, don't care how we do it..
65
onServoEvent
(Integer eventType, Integer currentPosUs, Integer targetPos)
voidThis servo event might need even more data to support IKsee above
66
publishIKServoEvent(IKData data)IKDataShould be removed - ServoEvents need to provide more data if necessary
i need to review why i needed to add this.. i think it was to provide feedback to the very primitive ik3d gui...
67
publishServoDisable(String name)Stringdoes anything use this ? - if so, how ? why ?
does something invoke this? if so.. anything that's either publish* or on* should be moved to the interface
68
publishServoEnable(String name)Stringdoes anything use this ? - if so, how ? why ?see above
69
publishServoEvent(Double position)Doubleoksee above
70
publishedSensorEventCalibration
(PinData[] data)voidneeds review ???see above
71
publishedSensorEventFeedback
(PinData[] data)voidneeds review ???see above
72
refreshControllers()Listwhat does this do?
73
releaseService()voidokpart of the life cycle... ok
74
rest()voidok
this is a member function. i prefer if this is private and people use setRest(double rest)
75
setAcceleration(double acceleration)voidok.. but i don't think this actually works as expectedThis is great thing ! And we need setDeceleration too. Dont know how to use it
76
setAnalogSensorPin(Integer pin)voidneeds review ???servos don't support this by default.. so maybe we should remove? related to finger sensor, it is worky, maybe the wrong place ?
77
setController(ServoController controller)voiddeprecated in favor of attach pattern ?it's a nice convience method . if you think setPin is ok. this should be ok also!
78
setInverted(boolean invert)voidok
maybe depricate? this inverted logic should proably all be subsumed by the map fuction?
79
setMaxVelocity(int velocity)voidmuch history here..
80
setMinMax(double min, double max)voidambigious, is that input or output ? depricate?
81
setPin(int pin)voidokuseful!
82
setRest(int rest)voiddeprecated in favor of double ?should be a doublefixed
83
setRest(Double rest)voidokok
84
setSpeed(double speed)voiddeprecated use setVelocitygah.. so much history here..
85
setSpeedControlOnUC(boolean b)voiddepricate / remove? i had some joystick scripts that used this
86
setSweepDelay(int delay)void
87
setVelocity(double velocity)void
88
stop()voidok - does it publish stop ServoEvent - does ServoEvent have a type ?depricate, use disable / enable.
89
sweep()voidok..
90
sweep(double min, double max)voidok..
91
sweep(double min, double max, int delay, double step)voidok..
92
sweep
(double min, double max, int delay, double step, boolean oneWay)
voidok..
93
sync(ServoControl sc)voidokwhat does this do?
94
temporaryStopAutoDisable
(boolean status)voidneeds review ???huh?!
:) In some case, like when we use tracking, we dont want servo autodisable. But after the action servo need to return to original state, defined by user.
95
timeToMove()intnothing uses this - nothing references itwhat?
96
writeMicroseconds(Integer uS)voidok..
97
98
99
100
Loading...
 
 
 
Sheet1