altoslib: create eeprom download thread before telling monitor about it
[fw/altos] / altoslib / AltosEepromDownload.java
index 542defeefb1e202c81a61019b9cec2bdfdd0fd97..1b04316715809b1e42be683748112761b6e720aa 100644 (file)
@@ -239,6 +239,7 @@ public class AltosEepromDownload implements Runnable {
 
        public void start() {
                eeprom_thread = new Thread(this);
+               monitor.set_thread(eeprom_thread);
                eeprom_thread.start();
        }
 
@@ -255,7 +256,6 @@ public class AltosEepromDownload implements Runnable {
 
                monitor.set_states(AltosLib.ao_flight_boost, AltosLib.ao_flight_landed);
 
-               monitor.set_thread(eeprom_thread);
                monitor.start();
        }
 }