From 0a69d10b37a782db2220b4f98adf6c2725f2d913 Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Mon, 31 Oct 2011 21:36:29 -0400 Subject: check to see if a sketch has been loaded before jumping out of bootloader --- bootloaders/diskloader/src/DiskLoader.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bootloaders/diskloader/src/DiskLoader.cpp') diff --git a/bootloaders/diskloader/src/DiskLoader.cpp b/bootloaders/diskloader/src/DiskLoader.cpp index 30ac1b6..2792bc6 100644 --- a/bootloaders/diskloader/src/DiskLoader.cpp +++ b/bootloaders/diskloader/src/DiskLoader.cpp @@ -109,6 +109,9 @@ const u8 _consts[] = void start_sketch() { + if (pgm_read_word(0) == -1) // no sketch has been uploaded yet - stay in bootloader + return; + L_LED_OFF(); RX_LED_OFF(); TX_LED_OFF(); -- cgit v1.2.3-18-g5258