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-04-03 16:26:56 +0300
committerDavid Crocker <dcrocker@eschertech.com>2018-04-03 16:26:56 +0300
commit8f3f4431bc6db2405e82883323c64d80d07cdd87 (patch)
tree28666967f09d7a6756cb7d3feb85ce50b14030a4 /src/Heating
parent7e12acb1d004ea91373d2e90b9aaee584a19d98b (diff)
Network now a separate task
The Network module is now a separate task Reduced network buffers from 8 to 6 to free up RAM FileInfoParser has its own buffer to save allocating them on multiple stacks Got rid of longWait and ClassReport
Diffstat (limited to 'src/Heating')
-rw-r--r--src/Heating/Heat.cpp14
-rw-r--r--src/Heating/Heat.h1
2 files changed, 3 insertions, 12 deletions
diff --git a/src/Heating/Heat.cpp b/src/Heating/Heat.cpp
index 48f1e568..d1e345c0 100644
--- a/src/Heating/Heat.cpp
+++ b/src/Heating/Heat.cpp
@@ -33,11 +33,8 @@ Licence: GPL
# include "Tasks.h"
-const uint32_t HeaterTaskStackSize = 128; // task stack size in dwords
-const uint32_t HeaterTaskPriority = 1;
-
-static uint32_t heaterTaskStack[HeaterTaskStackSize];
-static Task heaterTask;
+constexpr uint32_t HeaterTaskStackWords = 128; // task stack size in dwords
+static Task<HeaterTaskStackWords> heaterTask;
extern "C" void HeaterTask(void * pvParameters)
{
@@ -144,10 +141,9 @@ void Heat::Init()
coldExtrude = false;
#ifdef RTOS
- heaterTask.Create(HeaterTask, "HEAT", ARRAY_SIZE(heaterTaskStack), nullptr, HeaterTaskPriority, heaterTaskStack);
+ heaterTask.Create(HeaterTask, "HEAT", nullptr, TaskBase::HeatPriority);
#else
lastTime = millis() - platform.HeatSampleInterval(); // flag the PIDS as due for spinning
- longWait = millis();
active = true;
#endif
}
@@ -227,7 +223,6 @@ void Heat::Spin()
DhtSensor::Spin();
#endif
}
- platform.ClassReport(longWait);
}
#endif
@@ -253,9 +248,6 @@ void Heat::Diagnostics(MessageType mtype)
platform.MessageF(mtype, "Heater %d is on, I-accum = %.1f\n", heater, (double)(pids[heater]->GetAccumulator()));
}
}
-#ifdef RTOS
- Tasks::TaskDiagnostics(mtype, heaterTask);
-#endif
}
bool Heat::AllHeatersAtSetTemperatures(bool includingBed) const
diff --git a/src/Heating/Heat.h b/src/Heating/Heat.h
index 3812fc0a..620987de 100644
--- a/src/Heating/Heat.h
+++ b/src/Heating/Heat.h
@@ -168,7 +168,6 @@ private:
uint32_t lastWakeTime;
#else
uint32_t lastTime; // The last time our Spin() was called
- uint32_t longWait; // Long time for things that happen occasionally
bool active; // Are we active?
#endif