X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altoslib%2FAltosEepromIterable.java;h=77632ac139b2bf424bb19d8c98955bb4c1e8fc08;hb=44c0cecabb3a815dbf7f52e6b2dad364cc72b60c;hp=415c5b62099d87e5a1ea2ce720aa364b5b3d1099;hpb=f0216d721ed13f4d3dc608bb6ad8f83732b27c0a;p=fw%2Faltos diff --git a/altoslib/AltosEepromIterable.java b/altoslib/AltosEepromIterable.java index 415c5b62..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_4; +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 +}