Update eject_steps with the new unit API for demonstration
parent
402a2b91ce
commit
49275b2cb2
|
|
@ -50,7 +50,7 @@ bool EjectFilament::Step() {
|
|||
if (mm::motion.QueueEmpty()) { // selector parked aside
|
||||
state = ProgressCode::EjectingFilament;
|
||||
mm::motion.InitAxis(mm::Pulley);
|
||||
mm::motion.PlanMove(mm::Pulley, ejectSteps, 1500);
|
||||
mm::motion.PlanMove<mm::Pulley>(ejectLenght, ejectSpeed);
|
||||
}
|
||||
break;
|
||||
case ProgressCode::EjectingFilament:
|
||||
|
|
|
|||
|
|
@ -2,9 +2,14 @@
|
|||
#include <stdint.h>
|
||||
#include "command_base.h"
|
||||
#include "unload_filament.h"
|
||||
#include "../modules/axisunit.h"
|
||||
|
||||
namespace logic {
|
||||
|
||||
// These cannot be class memebers without definition until c++17
|
||||
static constexpr modules::motion::P_pos_t ejectLenght = 50.0_P_mm; //@@TODO
|
||||
static constexpr modules::motion::P_speed_t ejectSpeed = 1000.0_P_mm_s; //@@TODO
|
||||
|
||||
/// @brief A high-level command state machine - handles the complex logic of ejecting filament
|
||||
///
|
||||
/// The eject operation consists of:
|
||||
|
|
@ -31,7 +36,6 @@ public:
|
|||
ErrorCode Error() const override;
|
||||
|
||||
private:
|
||||
constexpr static const uint16_t ejectSteps = 500; //@@TODO
|
||||
UnloadFilament unl; ///< a high-level command/operation may be used as a building block of other operations as well
|
||||
uint8_t slot;
|
||||
void MoveSelectorAside();
|
||||
|
|
|
|||
Loading…
Reference in New Issue