Thank you. We will give this a go.
Code:
private boolean m_CancelCommand = false;
Code:
protected void initialize() {
43 m_CancelCommand = false;
44 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
45 // Not Allow movement if Wrist Is up !
46 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
47 if(m_setpoint>70 && Robot.wristPID.getSetpoint()>30){
48 System.out.println("Scissor Cancled Wrist > 30");
49 m_CancelCommand = true;
50 }else{
51 if(m_setpoint>30 && Robot.wristPID.getSetpoint()>55){
52 System.out.println("Scissor Cancled Wrist > 55");
53 m_CancelCommand = true;
54
55 }else{
56
57 Robot.scissorPID.enable();
58 Robot.scissorPID.setSetpoint(m_setpoint);
59
60
61 }
62 }
Code:
72 protected boolean isFinished() {
73
74 return Robot.scissorPID.onTarget() || m_CancelCommand ;
75
76
77 }
78