Tracked down a white board FIRE and verified the need for enterMode

pull/4/head
Paul Hollinsky 2018-10-22 18:26:38 -04:00
parent db255a5a3f
commit 419fc2fc73
1 changed files with 10 additions and 4 deletions

View File

@ -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;