@@ -750,15 +750,15 @@ def run_forever(self, **kwargs):
750750 """
751751 for key in kwargs :
752752 setattr (self , key , kwargs [key ])
753- self .command = 'run-forever'
753+ self .command = self . COMMAND_RUN_FOREVER
754754
755755 def run_to_abs_pos (self , ** kwargs ):
756756 """Run to an absolute position specified by `position_sp` and then
757757 stop using the action specified in `stop_action`.
758758 """
759759 for key in kwargs :
760760 setattr (self , key , kwargs [key ])
761- self .command = 'run-to-abs-pos'
761+ self .command = self . COMMAND_RUN_TO_ABS_POS
762762
763763 def run_to_rel_pos (self , ** kwargs ):
764764 """Run to a position relative to the current `position` value.
@@ -768,15 +768,15 @@ def run_to_rel_pos(self, **kwargs):
768768 """
769769 for key in kwargs :
770770 setattr (self , key , kwargs [key ])
771- self .command = 'run-to-rel-pos'
771+ self .command = self . COMMAND_RUN_TO_REL_POS
772772
773773 def run_timed (self , ** kwargs ):
774774 """Run the motor for the amount of time specified in `time_sp`
775775 and then stop the motor using the action specified by `stop_action`.
776776 """
777777 for key in kwargs :
778778 setattr (self , key , kwargs [key ])
779- self .command = 'run-timed'
779+ self .command = self . COMMAND_RUN_TIMED
780780
781781 def run_direct (self , ** kwargs ):
782782 """Run the motor at the duty cycle specified by `duty_cycle_sp`.
@@ -785,23 +785,23 @@ def run_direct(self, **kwargs):
785785 """
786786 for key in kwargs :
787787 setattr (self , key , kwargs [key ])
788- self .command = 'run-direct'
788+ self .command = self . COMMAND_RUN_DIRECT
789789
790790 def stop (self , ** kwargs ):
791791 """Stop any of the run commands before they are complete using the
792792 action specified by `stop_action`.
793793 """
794794 for key in kwargs :
795795 setattr (self , key , kwargs [key ])
796- self .command = 'stop'
796+ self .command = self . COMMAND_STOP
797797
798798 def reset (self , ** kwargs ):
799799 """Reset all of the motor parameter attributes to their default value.
800800 This will also have the effect of stopping the motor.
801801 """
802802 for key in kwargs :
803803 setattr (self , key , kwargs [key ])
804- self .command = 'reset'
804+ self .command = self . COMMAND_RESET
805805
806806
807807# ~autogen
@@ -1123,15 +1123,15 @@ def run_forever(self, **kwargs):
11231123 """
11241124 for key in kwargs :
11251125 setattr (self , key , kwargs [key ])
1126- self .command = 'run-forever'
1126+ self .command = self . COMMAND_RUN_FOREVER
11271127
11281128 def run_timed (self , ** kwargs ):
11291129 """Run the motor for the amount of time specified in `time_sp`
11301130 and then stop the motor using the action specified by `stop_action`.
11311131 """
11321132 for key in kwargs :
11331133 setattr (self , key , kwargs [key ])
1134- self .command = 'run-timed'
1134+ self .command = self . COMMAND_RUN_TIMED
11351135
11361136 def run_direct (self , ** kwargs ):
11371137 """Run the motor at the duty cycle specified by `duty_cycle_sp`.
@@ -1140,15 +1140,15 @@ def run_direct(self, **kwargs):
11401140 """
11411141 for key in kwargs :
11421142 setattr (self , key , kwargs [key ])
1143- self .command = 'run-direct'
1143+ self .command = self . COMMAND_RUN_DIRECT
11441144
11451145 def stop (self , ** kwargs ):
11461146 """Stop any of the run commands before they are complete using the
11471147 action specified by `stop_action`.
11481148 """
11491149 for key in kwargs :
11501150 setattr (self , key , kwargs [key ])
1151- self .command = 'stop'
1151+ self .command = self . COMMAND_STOP
11521152
11531153
11541154# ~autogen
@@ -1346,14 +1346,14 @@ def run(self, **kwargs):
13461346 """
13471347 for key in kwargs :
13481348 setattr (self , key , kwargs [key ])
1349- self .command = 'run'
1349+ self .command = self . COMMAND_RUN
13501350
13511351 def float (self , ** kwargs ):
13521352 """Remove power from the motor.
13531353 """
13541354 for key in kwargs :
13551355 setattr (self , key , kwargs [key ])
1356- self .command = 'float'
1356+ self .command = self . COMMAND_FLOAT
13571357
13581358
13591359# ~autogen
0 commit comments