Skip to content

Commit

Permalink
Fixes to previous merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dc42 committed Feb 5, 2023
1 parent b0c14c9 commit 014f1f1
Show file tree
Hide file tree
Showing 128 changed files with 924 additions and 653 deletions.
567 changes: 313 additions & 254 deletions .cproject

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,35 @@
</natures>
<filteredResources>
<filter>
<id>1670214705580</id>
<name>src/Networking/MQTT/MQTT-C</name>
<id>0</id>
<name>src/Networking/MQTT/MQTT_C</name>
<type>13</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-include</arguments>
</matcher>
</filter>
<filter>
<id>1670214705581</id>
<name>src/Networking/MQTT/MQTT-C</name>
<id>0</id>
<name>src/Networking/MQTT/MQTT_C</name>
<type>13</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-src</arguments>
</matcher>
</filter>
<filter>
<id>1670217666123</id>
<name>src/Networking/MQTT/MQTT-C/include</name>
<id>0</id>
<name>src/Networking/MQTT/MQTT_C/include</name>
<type>6</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-mqtt_pal.h</arguments>
</matcher>
</filter>
<filter>
<id>1670218610607</id>
<name>src/Networking/MQTT/MQTT-C/src</name>
<id>0</id>
<name>src/Networking/MQTT/MQTT_C/src</name>
<type>6</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
Expand Down
24 changes: 18 additions & 6 deletions src/GCodes/GCodes2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
#include "GCodeException.h"
#include "GCodeQueue.h"
#include "Heating/Heat.h"

#if HAS_SBC_INTERFACE
# include <SBC/SbcInterface.h>
#endif

#include <Movement/Move.h>
#include <Networking/Network.h>
#include <Networking/MQTT/MqttClient.h>

#include <PrintMonitor/PrintMonitor.h>
#include <Platform/RepRap.h>
#include <Tools/Tool.h>
Expand All @@ -33,6 +34,11 @@
# include <Platform/PortControl.h>
#endif

#if HAS_NETWORKING
# include <Networking/Network.h>
# include <Networking/MQTT/MqttClient.h>
#endif

#if HAS_WIFI_NETWORKING
# include <Comms/FirmwareUpdater.h>
#endif
Expand Down Expand Up @@ -3240,6 +3246,7 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx
break;
#endif

#if HAS_NETWORKING
case 540: // Set/report MAC address
if (CheckNetworkCommandAllowed(gb, reply, result))
{
Expand All @@ -3257,6 +3264,7 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx
}
}
break;
#endif

case 550: // Set/report machine name
#if HAS_SBC_INTERFACE
Expand Down Expand Up @@ -3292,6 +3300,7 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx
}
break;

#if HAS_NETWORKING
case 552: // Enable/Disable network and/or Set/Get IP address
if (CheckNetworkCommandAllowed(gb, reply, result))
{
Expand Down Expand Up @@ -3371,6 +3380,7 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx
}
}
break;
#endif

case 555: // Set/report firmware type to emulate
if (gb.Seen('P'))
Expand Down Expand Up @@ -3769,6 +3779,7 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx
result = ProbeTool(gb, reply);
break;

#if HAS_NETWORKING
case 586: // Configure network protocols
if (CheckNetworkCommandAllowed(gb, reply, result))
{
Expand All @@ -3778,15 +3789,15 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx
case -1:
{
bool seen = false;
#if SUPPORT_HTTP
# if SUPPORT_HTTP
if (gb.Seen('C'))
{
String<StringLength20> corsSite;
gb.GetQuotedString(corsSite.GetRef(), true);
reprap.GetNetwork().SetCorsSite(corsSite.c_str());
seen = true;
}
#endif
# endif

if (gb.Seen('P'))
{
Expand Down Expand Up @@ -3822,7 +3833,7 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx

if (!seen)
{
#if SUPPORT_HTTP
# if SUPPORT_HTTP
if (reprap.GetNetwork().GetCorsSite() != nullptr)
{
reply.printf("CORS enabled for site '%s'", reprap.GetNetwork().GetCorsSite());
Expand All @@ -3831,7 +3842,7 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx
{
reply.copy("CORS disabled");
}
#endif
# endif
// Default to reporting current protocols if P or S parameter missing
result = reprap.GetNetwork().ReportProtocols(interface, reply);
}
Expand All @@ -3850,6 +3861,7 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx

}
break;
#endif

#if HAS_WIFI_NETWORKING
case 587: // Add WiFi network or list remembered networks
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Loading

0 comments on commit 014f1f1

Please sign in to comment.