dummy
frog.hardware.plugins.stepper_motor.dummy
¤
Code for a fake stepper motor device.
Classes¤
DummyStepperMotor(steps_per_rotation=3600, move_duration=0.0)
¤
Bases: StepperMotorBase
A fake stepper motor device used for testing the GUI without the hardware.
This class uses a simple timer to notify when the move is complete after a fixed amount of time. It is not sophisticated enough to handle multiple queued moves as the ST10 controller does.
Create a new DummyStepperMotor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
steps_per_rotation
|
int
|
Number of motor steps for an entire rotation (360°) |
3600
|
move_duration
|
float
|
Amount of time taken for each move |
0.0
|
Source code in frog/hardware/plugins/stepper_motor/dummy.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
Attributes¤
is_moving
property
¤
Whether the motor is currently moving.
step
property
writable
¤
The current state of the device's step counter.
steps_per_rotation
property
¤
The number of steps that correspond to a full rotation.
Functions¤
stop_moving()
¤
Immediately stop moving the motor.
Source code in frog/hardware/plugins/stepper_motor/dummy.py
77 78 79 80 81 |
|