X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=telegps%2FTeleGPSConfig.java;h=d24e7471eaeba1a54cb7eef73a58082ffda00572;hp=22e6a3ac134477dcdc571502b9300ec35e2347e9;hb=238e56e0f6ab2f623e0faf25298b38dc3a4aff74;hpb=cd2179cb0d71749f3637cc3ee03ccc6adfd74aae diff --git a/telegps/TeleGPSConfig.java b/telegps/TeleGPSConfig.java index 22e6a3ac..d24e7471 100644 --- a/telegps/TeleGPSConfig.java +++ b/telegps/TeleGPSConfig.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,8 +23,8 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.text.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_11.*; +import org.altusmetrum.altosuilib_11.*; public class TeleGPSConfig implements ActionListener { @@ -221,20 +222,20 @@ public class TeleGPSConfig implements ActionListener { void save_data() { - /* bounds check stuff */ - if (config_ui.flight_log_max() > data.log_limit()) { - JOptionPane.showMessageDialog(owner, - String.format("Requested flight log, %dk, is larger than the available space, %dk.\n", - config_ui.flight_log_max(), - data.log_limit()), - "Maximum Flight Log Too Large", - JOptionPane.ERROR_MESSAGE); - return; - } + try { + /* bounds check stuff */ + if (config_ui.flight_log_max() > data.log_space()/1024) { + JOptionPane.showMessageDialog(owner, + String.format("Requested flight log, %dk, is larger than the available space, %dk.\n", + config_ui.flight_log_max(), + data.log_space()/1024), + "Maximum Flight Log Too Large", + JOptionPane.ERROR_MESSAGE); + return; + } - /* Pull data out of the UI and stuff back into our local data record */ + /* Pull data out of the UI and stuff back into our local data record */ - try { data.get_values(config_ui); run_serial_thread(serial_mode_save); } catch (AltosConfigDataException ae) {