aboutsummaryrefslogtreecommitdiff
path: root/bootloaders/diskloader/src/DiskLoader.cpp
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2011-10-31 21:36:29 -0400
committerZach Eveland <zeveland@blacklabel-development.com>2011-10-31 21:36:29 -0400
commit0a69d10b37a782db2220b4f98adf6c2725f2d913 (patch)
tree13522824402ba8eec179fc88ee94cdff68f4add0 /bootloaders/diskloader/src/DiskLoader.cpp
parentb7d91b3bbcc2776fc0484e99826732c5de3d58b2 (diff)
check to see if a sketch has been loaded before jumping out of bootloader
Diffstat (limited to 'bootloaders/diskloader/src/DiskLoader.cpp')
-rw-r--r--bootloaders/diskloader/src/DiskLoader.cpp3
1 files changed, 3 insertions, 0 deletions
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();