From 419fc2fc73e8ac56f8afbaaac022c7cb564c395e Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Mon, 22 Oct 2018 18:26:38 -0400 Subject: [PATCH] Tracked down a white board FIRE and verified the need for enterMode --- include/icsneo/device/neovifire/neovifire.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/icsneo/device/neovifire/neovifire.h b/include/icsneo/device/neovifire/neovifire.h index 05a24b0..cd8b881 100644 --- a/include/icsneo/device/neovifire/neovifire.h +++ b/include/icsneo/device/neovifire/neovifire.h @@ -28,16 +28,22 @@ public: Bootloader = 'B' }; - bool goOnline() { - // Enter mode is only needed on very old FIRE devices, will be ignored by newer devices + bool open() { + if(!com) + return false; + + if(!com->open()) + return false; + + // Enter mode is only needed on very old FIRE devices (white board), will be ignored by newer devices if(!enterMode(Mode::Application)) return false; - return Device::goOnline(); + return Device::open(); } bool enterMode(Mode mode) { - // Included for compatibility with bootloaders on very old FIRE devices + // Included for compatibility with bootloaders on very old FIRE devices (white board) // Mode will be a uppercase char like 'A' if(!com->rawWrite({ (uint8_t)mode })) return false;