Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replacing == with equals #280

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/replicatorg/app/gcode/GCodeParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/replicatorg/app/ui/PreferencesWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/replicatorg/app/ui/controlpanel/ExtruderPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)");
Expand Down
2 changes: 1 addition & 1 deletion src/replicatorg/plugin/toolpath/ProgressDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)";//
}
Expand Down