diff --git a/src/replicatorg/app/gcode/GCodeParser.java b/src/replicatorg/app/gcode/GCodeParser.java index d49f3e573..826bde5a2 100644 --- a/src/replicatorg/app/gcode/GCodeParser.java +++ b/src/replicatorg/app/gcode/GCodeParser.java @@ -651,7 +651,7 @@ private void buildGCodes(GCodeCommand gcode, Queue< DriverCommand > commands) th pos.setA(aVal); if (gcode.hasCode('E')) { // can't assume tool 0 == a, it's configurable in machine.xml! - if (driver.getMachine().getTool(tool).getMotorStepperAxis().name() == "B") { + if (driver.getMachine().getTool(tool).getMotorStepperAxis().name().equals("B")) { // Base.logger.warning("Mapping axis E to axis: " + driver.getMachine().getTool(tool).getMotorStepperAxis().name()); pos.setB(eVal); } else { @@ -674,7 +674,7 @@ private void buildGCodes(GCodeCommand gcode, Queue< DriverCommand > commands) th pos.setA(pos.a() + aVal); if (gcode.hasCode('E')) { // can't assume tool 0 == a, it's configurable in machine.xml! - if (driver.getMachine().getTool(tool).getMotorStepperAxis().name() == "B") { + if (driver.getMachine().getTool(tool).getMotorStepperAxis().name().equals("B")) { // Base.logger.warning("Mapping axis E to axis: " + driver.getMachine().getTool(tool).getMotorStepperAxis().name()); pos.setB(pos.b() + eVal); } else { @@ -891,7 +891,7 @@ else if (gcode.hasCode('R')) { current.setA(aVal); if (gcode.hasCode('E')) { // can't assume tool 0 == a, it's configurable in machine.xml! - if (driver.getMachine().getTool(tool).getMotorStepperAxis().name() == "B") { + if (driver.getMachine().getTool(tool).getMotorStepperAxis().name().equals("B")) { // Base.logger.warning("Resetting position of axis E to axis: " + driver.getMachine().getTool(tool).getMotorStepperAxis().name()); current.setB(eVal); } else { diff --git a/src/replicatorg/app/ui/PreferencesWindow.java b/src/replicatorg/app/ui/PreferencesWindow.java index 77b88fb86..6053a7197 100644 --- a/src/replicatorg/app/ui/PreferencesWindow.java +++ b/src/replicatorg/app/ui/PreferencesWindow.java @@ -269,7 +269,7 @@ public void actionPerformed(ActionEvent e) { arcResolutionField.setColumns(10); arcResolutionField.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { - if (evt.getPropertyName() == "value") { + if (evt.getPropertyName().equals("value")) { try { Double v = (Double)evt.getNewValue(); if (v == null) return; @@ -300,7 +300,7 @@ public void propertyChange(PropertyChangeEvent evt) { sfTimeoutField.setColumns(10); sfTimeoutField.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { - if (evt.getPropertyName() == "value") { + if (evt.getPropertyName().equals("value")) { try { Integer v = ((Number)evt.getNewValue()).intValue(); if (v == null) return; @@ -388,7 +388,7 @@ public void actionPerformed(ActionEvent arg0) { // let's avoid creating too many Anon. inner Listeners, also is fewer lines (and just as clear)! PropertyChangeListener p = new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { - if (evt.getPropertyName() == "value") { + if (evt.getPropertyName().equals("value")) { double target; if(evt.getSource() == t0Field) { diff --git a/src/replicatorg/app/ui/controlpanel/ExtruderPanel.java b/src/replicatorg/app/ui/controlpanel/ExtruderPanel.java index cbfba69b3..d3202dfe8 100644 --- a/src/replicatorg/app/ui/controlpanel/ExtruderPanel.java +++ b/src/replicatorg/app/ui/controlpanel/ExtruderPanel.java @@ -259,7 +259,7 @@ public void actionPerformed(ActionEvent e) { // Due to current implementation issues, we need to send the PWM // before the RPM for a stepper motor. Thus we display both controls in these // cases. This shouldn't be necessary for a Gen4 stepper extruder. (it's not!) - if ((tool.getMotorStepperAxisName() == "") && + if ((tool.getMotorStepperAxisName().length() == 0) && !(tool.motorHasEncoder() || tool.motorIsStepper())) { // our motor speed vars JLabel label = makeLabel("Motor Speed (PWM)"); diff --git a/src/replicatorg/plugin/toolpath/ProgressDialog.java b/src/replicatorg/plugin/toolpath/ProgressDialog.java index 57d0cd426..152a37678 100644 --- a/src/replicatorg/plugin/toolpath/ProgressDialog.java +++ b/src/replicatorg/plugin/toolpath/ProgressDialog.java @@ -447,7 +447,7 @@ else if( currentSlicer.startsWith("Miracle")) { String j = new Integer(layerTotal).toString(); double completion = ((double) layerIndex/layerTotal); - if((layerIndex>0) && (processName == "")) + if((layerIndex>0) && (processName.length() == 0)) { newMessage += " ("+j+" layers)";// }