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
path: root/src/Duet
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2018-03-11 14:16:57 +0300
committerDavid Crocker <dcrocker@eschertech.com>2018-03-11 14:16:57 +0300
commitb1369644379aa9c6a1dd8f84d20210f32ded6dd5 (patch)
tree0d5e376cc33d1344e6d007540127b2746f1803be /src/Duet
parentafd7e327ec71865a2ecf0243265ef6f84387becb (diff)
Version 1.21RC4(11b1)
New features: - On CoreXZ machines we no longer require Z to be homed before bed probing with G30 - M589 now checks that the password is either empty or 8 characters minimum - G10 L2 is supported as an alternative way to set tool offsets - G10 L20 is supported as an alternative way to set workspace coordinates - Heater fault detection is suppressed when heaters are suspended during bed probing - DuetWiFiServer/bin uses a new SDK version, which seems to resolve some issues - On boards with a W5500 Ethernet interface, the Ethernet PHY is now programmed to auto negotiate - Added M564 H0 command to allow axis movement before homing on Cartesian/CoreXY printers - The filament length comment proposed to be generated by the next version of Cura when using more than one filament is supported Bug fixes: - I parameter on M452, M453 and M573 didn't work - If a homing file contained an illegal movement command then homing was not cancelled - Corrected Z probe input pin in RADDS build - Possible fix to Duet 06/085 failure to start when using DHCP
Diffstat (limited to 'src/Duet')
-rw-r--r--src/Duet/Network.cpp54
-rw-r--r--src/Duet/Webserver.cpp1
2 files changed, 28 insertions, 27 deletions
diff --git a/src/Duet/Network.cpp b/src/Duet/Network.cpp
index 7d20cedb..3d2a8d3b 100644
--- a/src/Duet/Network.cpp
+++ b/src/Duet/Network.cpp
@@ -461,31 +461,33 @@ void Network::Spin(bool full)
return;
}
}
-
- NetworkTransaction *transaction = writingTransactions;
- if (transaction != nullptr && sendingConnection == nullptr)
+ else if (state == NetworkActive)
{
- if (transaction->next != nullptr)
+ NetworkTransaction *transaction = writingTransactions;
+ if (transaction != nullptr && sendingConnection == nullptr)
{
- // Data is supposed to be sent and the last packet has been acknowledged.
- // Rotate the transactions so every client is served even while multiple files are sent
- NetworkTransaction *next = transaction->next;
- writingTransactions = next;
- AppendTransaction(&writingTransactions, transaction);
- transaction = next;
- }
-
- if (transaction->Send())
- {
- // This transaction can be released, do this here
- writingTransactions = transaction->next;
- PrependTransaction(&freeTransactions, transaction);
+ if (transaction->next != nullptr)
+ {
+ // Data is supposed to be sent and the last packet has been acknowledged.
+ // Rotate the transactions so every client is served even while multiple files are sent
+ NetworkTransaction *next = transaction->next;
+ writingTransactions = next;
+ AppendTransaction(&writingTransactions, transaction);
+ transaction = next;
+ }
- // If there is more data to write on this connection, do it sometime soon
- NetworkTransaction *nextWrite = transaction->nextWrite;
- if (nextWrite != nullptr)
+ if (transaction->Send())
{
- PrependTransaction(&writingTransactions, nextWrite);
+ // This transaction can be released, do this here
+ writingTransactions = transaction->next;
+ PrependTransaction(&freeTransactions, transaction);
+
+ // If there is more data to write on this connection, do it sometime soon
+ NetworkTransaction *nextWrite = transaction->nextWrite;
+ if (nextWrite != nullptr)
+ {
+ PrependTransaction(&writingTransactions, nextWrite);
+ }
}
}
}
@@ -530,7 +532,7 @@ void Network::Diagnostics(MessageType mtype)
platform.Message(mtype, "=== Network ===\n");
size_t numFreeConnections = 0;
- ConnectionState *freeConn = freeConnections;
+ const ConnectionState *freeConn = freeConnections;
while (freeConn != nullptr)
{
numFreeConnections++;
@@ -539,7 +541,7 @@ void Network::Diagnostics(MessageType mtype)
platform.MessageF(mtype, "Free connections: %d of %d\n", numFreeConnections, MEMP_NUM_TCP_PCB);
size_t numFreeTransactions = 0;
- NetworkTransaction *freeTrans = freeTransactions;
+ const NetworkTransaction *freeTrans = freeTransactions;
while (freeTrans != nullptr)
{
numFreeTransactions++;
@@ -567,7 +569,7 @@ void Network::ResetCallback()
// Called when data has been received. Return false if we cannot process it
bool Network::ReceiveInput(pbuf *pb, ConnectionState* cs)
{
- NetworkTransaction* r = freeTransactions;
+ NetworkTransaction* const r = freeTransactions;
if (r == nullptr)
{
platform.Message(UsbMessage, "Network::ReceiveInput() - no free transactions!\n");
@@ -586,14 +588,14 @@ bool Network::ReceiveInput(pbuf *pb, ConnectionState* cs)
// or NULL if no more items are available. This would reset the connection immediately
ConnectionState *Network::ConnectionAccepted(tcp_pcb *pcb)
{
- ConnectionState *cs = freeConnections;
+ ConnectionState * const cs = freeConnections;
if (cs == nullptr)
{
platform.Message(UsbMessage, "Network::ConnectionAccepted() - no free ConnectionStates!\n");
return nullptr;
}
- NetworkTransaction* transaction = freeTransactions;
+ NetworkTransaction* const transaction = freeTransactions;
if (transaction == nullptr)
{
platform.Message(UsbMessage, "Network::ConnectionAccepted() - no free transactions!\n");
diff --git a/src/Duet/Webserver.cpp b/src/Duet/Webserver.cpp
index f378b39a..1756e324 100644
--- a/src/Duet/Webserver.cpp
+++ b/src/Duet/Webserver.cpp
@@ -1065,7 +1065,6 @@ void Webserver::HttpInterpreter::ConnectionLost(Connection conn)
// Make sure deferred requests are cancelled
if (deferredRequestConnection == conn)
{
- reprap.GetPrintMonitor().StopParsing(filenameBeingProcessed);
deferredRequestConnection = NoConnection;
}