From 378ebab2e70917b4182cbd840a3fa66e4e42fd92 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 22 Aug 2018 17:42:13 -0700 Subject: altoslib: Use common constants for flash action messages Place messages in AltosFlashListener instead of using the same strings in three different places. Signed-off-by: Keith Packard --- altoslib/AltosSelfFlash.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'altoslib/AltosSelfFlash.java') diff --git a/altoslib/AltosSelfFlash.java b/altoslib/AltosSelfFlash.java index 75fc7946..20839ce4 100644 --- a/altoslib/AltosSelfFlash.java +++ b/altoslib/AltosSelfFlash.java @@ -101,7 +101,7 @@ public class AltosSelfFlash extends AltosProgrammer { long flash_addr = image.address; int image_start = 0; - action("start", 0); + action(AltosFlashListener.flash_start, 0); action(0, image.data.length); while (remain > 0 && !aborted) { int this_time = remain; @@ -129,7 +129,7 @@ public class AltosSelfFlash extends AltosProgrammer { action(image.data.length - remain, image.data.length); } if (!aborted) { - action("done", 100); + action(AltosFlashListener.flash_done, 100); } close(); } catch (IOException ie) { -- cgit v1.2.3