public void SetSettings(LaserCatSettings settings)
 {
     this.settings = settings;
 }
 public void SetSettings(LaserCatSettings settings)
 {
     var data = new List<byte>() { settings.pulse_microseconds,
               settings.step_invert_mask,
               settings.dir_invert_mask,
               settings.stepper_idle_lock_time,
               settings.flags,
               settings.step_port_invert_mask,
               settings.dir_port_invert_mask};
     mComMan.Send(ECommands.SETSETTINGS_COMMAND, data);
 }
Exemplo n.º 3
0
        // Reset and clear stepper subsystem variables
        public void st_reset()
        {
            // Initialize stepper driver idle state.
              //st_go_idle();

              // Initialize stepper algorithm variables.
              prep = new st_prep_t();
              pl_blockIdx = -1;  // Planner block pointer used by segment buffer

              st_generate_step_dir_invert_masks();

              LaserCatSettings lcSettings = new LaserCatSettings();
              lcSettings.dir_invert_mask = settings.dir_invert_mask;
              lcSettings.flags = settings.flags;
              lcSettings.pulse_microseconds = settings.pulse_microseconds;
              lcSettings.step_invert_mask = settings.step_invert_mask;
              lcSettings.stepper_idle_lock_time = settings.stepper_idle_lock_time;
              lcSettings.step_port_invert_mask = step_port_invert_mask;
              lcSettings.dir_port_invert_mask = dir_port_invert_mask;
              mLaserCatHardware.SetSettings(lcSettings);
        }