Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2018-02-12 21:08:19 +0300
committerDavid Crocker <dcrocker@eschertech.com>2018-02-12 21:08:19 +0300
commit99c2896a3e64ca76d67dda59b61ca9a8b5c6856a (patch)
treeb7f4d70a50b3167dac04c6a5d778918448982a54 /src/RepRap.cpp
parent5fa6a17b4678b54c17dff37b8717cfac15446c7c (diff)
Combined DuetWiFi and DuetEthernet builds
Diffstat (limited to 'src/RepRap.cpp')
-rw-r--r--src/RepRap.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/RepRap.cpp b/src/RepRap.cpp
index 8340fe17..e3773711 100644
--- a/src/RepRap.cpp
+++ b/src/RepRap.cpp
@@ -94,7 +94,6 @@ RepRap::RepRap() : toolList(nullptr), currentTool(nullptr), lastWarningMillis(0)
printMonitor = new PrintMonitor(*platform, *gCodes);
SetPassword(DEFAULT_PASSWORD);
- SetName(DEFAULT_MACHINE_NAME);
message[0] = 0;
}
@@ -102,8 +101,9 @@ void RepRap::Init()
{
// All of the following init functions must execute reasonably quickly before the watchdog times us out
platform->Init();
- gCodes->Init();
network->Init();
+ SetName(DEFAULT_MACHINE_NAME); // network must be initialised before calling this because it calls SetHostName
+ gCodes->Init();
move->Init();
heat->Init();
#if SUPPORT_ROLAND
@@ -119,7 +119,7 @@ void RepRap::Init()
#if SUPPORT_12864_LCD
display->Init();
#endif
- active = true; // must do this before we start the network, else the watchdog may time out
+ active = true; // must do this before we start the network, else the watchdog may time out
platform->MessageF(UsbMessage, "%s Version %s dated %s\n", FIRMWARE_NAME, VERSION, DATE);
@@ -1234,9 +1234,19 @@ OutputBuffer *RepRap::GetConfigResponse()
#endif
response->catf("\",\"firmwareName\":\"%s\"", FIRMWARE_NAME);
response->catf(",\"firmwareVersion\":\"%s\"", VERSION);
+
#if HAS_WIFI_NETWORKING
- response->catf(",\"dwsVersion\":\"%s\"", network->GetWiFiServerVersion());
+ // If we have WiFi networking, send the WiFi module firmware version
+# ifdef DUET_NG
+ if (platform->IsDuetWiFi())
+ {
+# endif
+ response->catf(",\"dwsVersion\":\"%s\"", network->GetWiFiServerVersion());
+# ifdef DUET_NG
+ }
+# endif
#endif
+
response->catf(",\"firmwareDate\":\"%s\"", DATE);
// Motor idle parameters