Esempio n. 1
0
        public ItersolveBase set_stepper_kinematics(ItersolveBase sk)
        {
            var old_sk = this._stepper_kinematics;

            this._stepper_kinematics = sk;
            if (sk != null)
            {
                sk.itersolve_set_stepcompress(ref this._stepqueue, this._step_dist);
                //this._ffi_lib.itersolve_set_stepcompress(sk, this._stepqueue, this._step_dist);
            }
            return(old_sk);
        }
Esempio n. 2
0
 public Mcu_stepper(Mcu mcu, PinParams pin_parameters)
 {
     this._mcu = mcu;
     this._oid = this._mcu.create_oid();
     this._mcu.register_config_callback(this._build_config);
     this._step_pin            = pin_parameters.pin;
     this._invert_step         = pin_parameters.invert;
     this._dir_pin             = null;
     this._mcu_position_offset = 0.0;
     this._step_dist           = 0.0;
     this._min_stop_interval   = 0.0;
     this._reset_cmd_id        = 0;
     this._get_position_cmd    = null;
     //var _tup_1 = chelper.get_ffi();
     //var ffi_main = _tup_1.Item1;
     //this._ffi_lib = _tup_1.Item2;
     //this._stepqueue = ffi_main.gc(this._ffi_lib.stepcompress_alloc(this._oid), this._ffi_lib.stepcompress_free);
     this._stepqueue = new stepcompress((uint)this._oid);
     this._mcu.register_stepqueue(this._stepqueue);
     this._stepper_kinematics = null;
     this.set_ignore_move(false);
 }