|
@@ -896,26 +896,32 @@ public class Frame extends JFrame implements ListSelectionListener {
|
896
|
896
|
}
|
897
|
897
|
}
|
898
|
898
|
|
|
899
|
+ // We get detailed error messages from the SerialHelper...
|
899
|
900
|
public void upload_ActionPerformed(ActionEvent evt) {
|
900
|
901
|
if (jComboBox1.getSelectedItem().equals("Select serial port...")) {
|
901
|
|
- errorMessage("No serial port selected...");
|
|
902
|
+ // errorMessage("No serial port selected...");
|
902
|
903
|
} else {
|
903
|
|
- if (worker
|
904
|
|
- .probeCubeConnected((String) jComboBox1.getSelectedItem())) {
|
|
904
|
+ if (worker.probeCubeConnected((String) jComboBox1.getSelectedItem())) {
|
905
|
905
|
if (worker.uploadState((String) jComboBox1.getSelectedItem()) != 0) {
|
906
|
|
- errorMessage("Could not upload data!");
|
|
906
|
+ // errorMessage("Could not upload data!");
|
907
|
907
|
}
|
908
|
908
|
} else {
|
909
|
|
- errorMessage("Cube does not respond...");
|
|
909
|
+ // errorMessage("Cube does not respond...");
|
910
|
910
|
}
|
911
|
911
|
}
|
912
|
912
|
}
|
913
|
913
|
|
914
|
914
|
public void download_ActionPerformed(ActionEvent evt) {
|
915
|
915
|
if (jComboBox1.getSelectedItem().equals("Select serial port...")) {
|
916
|
|
- errorMessage("No serial port selected...");
|
|
916
|
+ // errorMessage("No serial port selected...");
|
917
|
917
|
} else {
|
918
|
|
- worker.downloadState((String) jComboBox1.getSelectedItem());
|
|
918
|
+ if (worker.probeCubeConnected((String) jComboBox1.getSelectedItem())) {
|
|
919
|
+ if (worker.downloadState((String) jComboBox1.getSelectedItem()) != 0) {
|
|
920
|
+ // errorMessage("Could not download data!");
|
|
921
|
+ }
|
|
922
|
+ } else {
|
|
923
|
+ // errorMessage("Cube does not respond...");
|
|
924
|
+ }
|
919
|
925
|
}
|
920
|
926
|
}
|
921
|
927
|
|