@@ -531,30 +531,30 @@ def __set_time_sp(self, value):
531531#~autogen
532532#~autogen python_generic-helper-function classes.motor>currentClass
533533
534- _properties = [
535- 'command'
536- , 'duty_cycle_sp'
537- , 'encoder_polarity'
538- , 'polarity'
539- , 'position'
540- , 'hold_pid/Kp'
541- , 'hold_pid/Ki'
542- , 'hold_pid/Kd'
543- , 'position_sp'
544- , 'speed_sp'
545- , 'ramp_up_sp'
546- , 'ramp_down_sp'
547- , 'speed_regulation'
548- , 'speed_pid/Kp'
549- , 'speed_pid/Ki'
550- , 'speed_pid/Kd'
551- , 'stop_command'
552- , 'time_sp' ]
534+ _properties = {
535+ 'command' : __set_command
536+ , 'duty_cycle_sp' : __set_duty_cycle_sp
537+ , 'encoder_polarity' : __set_encoder_polarity
538+ , 'polarity' : __set_polarity
539+ , 'position' : __set_position
540+ , 'position_p' : __set_position_p
541+ , 'position_i' : __set_position_i
542+ , 'position_d' : __set_position_d
543+ , 'position_sp' : __set_position_sp
544+ , 'speed_sp' : __set_speed_sp
545+ , 'ramp_up_sp' : __set_ramp_up_sp
546+ , 'ramp_down_sp' : __set_ramp_down_sp
547+ , 'speed_regulation_enabled' : __set_speed_regulation_enabled
548+ , 'speed_regulation_p' : __set_speed_regulation_p
549+ , 'speed_regulation_i' : __set_speed_regulation_i
550+ , 'speed_regulation_d' : __set_speed_regulation_d
551+ , 'stop_command' : __set_stop_command
552+ , 'time_sp' : __set_time_sp }
553553
554554 def _helper ( self , ** kwargs ):
555555 for p ,v in kwargs .iteritems ():
556556 if p in self ._properties :
557- self ._set_int_attribute ( p , p , v )
557+ self ._properties [ p ]( self , v )
558558
559559 def run_forever ( self , ** kwargs ):
560560 self ._helper ( ** kwargs )
@@ -768,19 +768,19 @@ def __set_time_sp(self, value):
768768
769769#~autogen python_generic-helper-function classes.dcMotor>currentClass
770770
771- _properties = [
772- 'command'
773- , 'duty_cycle_sp'
774- , 'polarity'
775- , 'ramp_down_sp'
776- , 'ramp_up_sp'
777- , 'stop_command'
778- , 'time_sp' ]
771+ _properties = {
772+ 'command' : __set_command
773+ , 'duty_cycle_sp' : __set_duty_cycle_sp
774+ , 'polarity' : __set_polarity
775+ , 'ramp_down_sp' : __set_ramp_down_sp
776+ , 'ramp_up_sp' : __set_ramp_up_sp
777+ , 'stop_command' : __set_stop_command
778+ , 'time_sp' : __set_time_sp }
779779
780780 def _helper ( self , ** kwargs ):
781781 for p ,v in kwargs .iteritems ():
782782 if p in self ._properties :
783- self ._set_int_attribute ( p , p , v )
783+ self ._properties [ p ]( self , v )
784784
785785 def run_forever ( self , ** kwargs ):
786786 self ._helper ( ** kwargs )
@@ -965,19 +965,19 @@ def __get_state(self):
965965
966966#~autogen python_generic-helper-function classes.servoMotor>currentClass
967967
968- _properties = [
969- 'command'
970- , 'max_pulse_sp'
971- , 'mid_pulse_sp'
972- , 'min_pulse_sp'
973- , 'polarity'
974- , 'position_sp'
975- , 'rate_sp' ]
968+ _properties = {
969+ 'command' : __set_command
970+ , 'max_pulse_sp' : __set_max_pulse_sp
971+ , 'mid_pulse_sp' : __set_mid_pulse_sp
972+ , 'min_pulse_sp' : __set_min_pulse_sp
973+ , 'polarity' : __set_polarity
974+ , 'position_sp' : __set_position_sp
975+ , 'rate_sp' : __set_rate_sp }
976976
977977 def _helper ( self , ** kwargs ):
978978 for p ,v in kwargs .iteritems ():
979979 if p in self ._properties :
980- self ._set_int_attribute ( p , p , v )
980+ self ._properties [ p ]( self , v )
981981
982982 def run ( self , ** kwargs ):
983983 self ._helper ( ** kwargs )
0 commit comments