diff options
author | Keith Packard <keithp@keithp.com> | 2013-12-18 13:09:48 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-12-18 13:09:48 -0800 |
commit | b19a648b667c298d2d9d5ed4ee9db661be058d1a (patch) | |
tree | cd063fbbf2cdbdb70c2212b1fc3f9787fb6934a1 /altoslib/AltosEepromDownload.java | |
parent | 216405bc49ef2fc0e9941989f054e41f2fef9cfe (diff) |
altoslib: create eeprom download thread before telling monitor about it
Telling the monitor too early resulted in passing a null thread
handle, which meant that 'cancel' wouldn't ever work.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosEepromDownload.java')
-rw-r--r-- | altoslib/AltosEepromDownload.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/altoslib/AltosEepromDownload.java b/altoslib/AltosEepromDownload.java index 542defee..1b043167 100644 --- a/altoslib/AltosEepromDownload.java +++ b/altoslib/AltosEepromDownload.java @@ -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(); } } |