skuhl / RobotRun

Robotics simulator
4 stars 1 forks source link

Blank Instruction Editing #231

Closed neoaero99 closed 7 years ago

neoaero99 commented 7 years ago

For the pendant program instruction navigation screen, editing a blank instruction (F4 on the teach pendant) should function similar to overwriting the instruction (F2 on the teach pendant).

vtdrusch commented 7 years ago

I've added a case in the edit screen logic that transitions to the select instruction screen if the currently selected instruction does not match any of the instruction subtypes that we check for when editing an instruction, but this could potentially cause unintended behavior if we don't check for every subclass of Instruction when editing an instruction in the program.

neoaero99 commented 7 years ago

I have a solution for that: We can make the Instruction class abstract add a BlankInstruction class, which functions as our current Instruction class does, so we should not have any inheritance problems.

neoaero99 commented 7 years ago

I have implemented the solution specified above, so we should not run into any issues with new instructions and editing.