public void deep_clone(pan_tilt_absolute_command rhs) { base.deep_clone(rhs); pan_tilt_speed = rhs.pan_tilt_speed; pan_pos = new pan_position(rhs.pan_pos); tilt_pos = new tilt_position(rhs.tilt_pos); }
public void absolute_pan_tilt(int speed, pan_position pan_angle, tilt_position tilt_angle) { if (!hardware_connected) // No motion commands allowed now return; lock (command_buffer) { // Eliminate any pan/tilt command from the buffer for (int i = 0; i < command_buffer.Count; ++i) if (command_buffer[i] is pan_tilt_absolute_command || command_buffer[i] is pan_tilt_cancel_command || command_buffer[i] is pan_tilt_jog_command || command_buffer[i] is pan_tilt_stop_jog_command) // There's already a pan/tilt command that is awaiting dispatch command_buffer.RemoveAt(i); command_buffer.Add(new pan_tilt_absolute_command(camera_num, speed, pan_angle, tilt_angle)); // Add it to the end of the buffer } }
public pan_tilt_absolute_command(int camera_number, int speed = 6, pan_position p = null, tilt_position t = null) : base(camera_number) { pan_tilt_speed = speed; if (p == null) pan_pos = new pan_position(); else pan_pos = new pan_position(p); if (t == null) tilt_pos = new tilt_position(); else tilt_pos = new tilt_position(t); }
public pan_tilt_absolute_command(pan_tilt_absolute_command rhs) : base(rhs) { pan_tilt_speed = rhs.pan_tilt_speed; pan_pos = new pan_position(rhs.pan_pos); tilt_pos = new tilt_position(rhs.tilt_pos); }
// The warning given here is a bug in the compiler. It makes no sense to have "new" (or "override") for a static function. public static tilt_position create_from_radians(double r) { tilt_position p = new tilt_position(); p.radians = r; return p; }
// The warning given here is a bug in the compiler. It makes no sense to have "new" (or "override") for a static function. public static tilt_position create_from_encoder_count(short e) { tilt_position p = new tilt_position(); p.encoder_count = e; return p; }
// The warning given here is a bug in the compiler. It makes no sense to have "new" (or "override") for a static function. public static tilt_position create_from_degrees(double d) { tilt_position p = new tilt_position(); p.degrees = d; return p; }
public tilt_position(tilt_position rhs) : base(rhs) { }
public readonly_tilt_position(tilt_position rhs) { pos.deep_clone(rhs); }