+ void show_safely(AltosState in_state, int in_crc_errors) {
+ final AltosState state = in_state;
+ final int crc_errors = in_crc_errors;
+ Runnable r = new Runnable() {
+ public void run() {
+ try {
+ show_internal(state, crc_errors);
+ } catch (Exception ex) {
+ }
+ }
+ };
+ SwingUtilities.invokeLater(r);
+ }
+
+ void reading_error_internal(String name) {
+ JOptionPane.showMessageDialog(parent,
+ String.format("Error reading from \"%s\"", name),
+ "Telemetry Read Error",
+ JOptionPane.ERROR_MESSAGE);
+ }
+
+ void reading_error_safely(String in_name) {
+ final String name = in_name;
+ Runnable r = new Runnable() {
+ public void run() {
+ try {
+ reading_error_internal(name);
+ } catch (Exception ex) {
+ }
+ }
+ };
+ SwingUtilities.invokeLater(r);
+ }
+