From b19a648b667c298d2d9d5ed4ee9db661be058d1a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Dec 2013 13:09:48 -0800 Subject: [PATCH] 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 --- altoslib/AltosEepromDownload.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } } -- 2.30.2