X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altoslib%2FAltosEepromIterable.java;h=77632ac139b2bf424bb19d8c98955bb4c1e8fc08;hb=c296acd643698d0128e2f58f91a9cfeea63f580a;hp=081721b3ecec0ac18a19dd76d69b1ab601171a85;hpb=b89fb51a963635e2effe3a31f803bfc29c2c46b7;p=fw%2Faltos diff --git a/altoslib/AltosEepromIterable.java b/altoslib/AltosEepromIterable.java index 081721b3..77632ac1 100644 --- a/altoslib/AltosEepromIterable.java +++ b/altoslib/AltosEepromIterable.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 @@ -15,7 +16,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_3; +package org.altusmetrum.altoslib_11; import java.io.*; import java.util.*; @@ -38,6 +39,13 @@ class AltosEepromOrdered implements Comparable { if (cmd_diff != 0) return cmd_diff; + if (eeprom.has_seconds() && o.eeprom.has_seconds()) { + int seconds_diff = eeprom.seconds() - o.eeprom.seconds(); + + if (seconds_diff != 0) + return seconds_diff; + } + int tick_diff = tick - o.tick; if (tick_diff != 0) @@ -116,4 +124,4 @@ public class AltosEepromIterable implements Iterable { eeproms = new LinkedList(); return new AltosEepromOrderedIterator(eeproms); } -} \ No newline at end of file +}