diff options
author | Manuel Coenen <manuel@duet3d.com> | 2021-01-22 12:23:24 +0300 |
---|---|---|
committer | Manuel Coenen <manuel@duet3d.com> | 2021-01-22 12:23:24 +0300 |
commit | 9b2520395b91fd1b2a33ce94f61f4e9a44761a1d (patch) | |
tree | f947aa0080d23da4d426b674745cb899531e212c /src/Comms | |
parent | cb414c464db7167c51df3dad89121f5050eeeafc (diff) |
Fix PanelDue flashing not possible on Duet 3 Mini 5+ when in SBC mode
Diffstat (limited to 'src/Comms')
-rw-r--r-- | src/Comms/FirmwareUpdater.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/Comms/FirmwareUpdater.cpp b/src/Comms/FirmwareUpdater.cpp index 7ae2a1ec..2d095e51 100644 --- a/src/Comms/FirmwareUpdater.cpp +++ b/src/Comms/FirmwareUpdater.cpp @@ -32,21 +32,25 @@ namespace FirmwareUpdater GCodeResult CheckFirmwareUpdatePrerequisites(uint8_t moduleMap, GCodeBuffer& gb, const StringRef& reply, const size_t serialChannel) noexcept { #if HAS_WIFI_NETWORKING - GCodeResult result; - if (!reprap.GetGCodes().CheckNetworkCommandAllowed(gb, reply, result)) + if ( (moduleMap & (1 << WifiExternalFirmwareModule)) != 0 + || (moduleMap & (1 << WifiFirmwareModule)) != 0) { - return result; - } - if ((moduleMap & (1 << WifiExternalFirmwareModule)) != 0 && (moduleMap & (1 << WifiFirmwareModule)) != 0) - { - reply.copy("Invalid combination of firmware update modules"); - return GCodeResult::error; - } - if ((moduleMap & (1 << WifiFirmwareModule)) != 0 - && !reprap.GetPlatform().FileExists(DEFAULT_SYS_DIR, WIFI_FIRMWARE_FILE)) - { - reply.printf("File %s not found", WIFI_FIRMWARE_FILE); - return GCodeResult::error; + GCodeResult result; + if (!reprap.GetGCodes().CheckNetworkCommandAllowed(gb, reply, result)) + { + return result; + } + if ((moduleMap & (1 << WifiExternalFirmwareModule)) != 0 && (moduleMap & (1 << WifiFirmwareModule)) != 0) + { + reply.copy("Invalid combination of firmware update modules"); + return GCodeResult::error; + } + if ((moduleMap & (1 << WifiFirmwareModule)) != 0 + && !reprap.GetPlatform().FileExists(DEFAULT_SYS_DIR, WIFI_FIRMWARE_FILE)) + { + reply.printf("File %s not found", WIFI_FIRMWARE_FILE); + return GCodeResult::error; + } } #endif #if HAS_AUX_DEVICES |