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>2021-10-09 19:14:50 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-10-09 19:14:50 +0300
commit413bdc618be04db2d824a11c75ab3bb5880dd1ed (patch)
treeb07b2c524147f0a3fa368af417eecf7d3aba0a89
parent662240bf17caa22fbb208d36f9f1871e9370ac87 (diff)
Reduced precision of closed loop data3.4.0beta5
-rw-r--r--src/ClosedLoop/ClosedLoop.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ClosedLoop/ClosedLoop.cpp b/src/ClosedLoop/ClosedLoop.cpp
index a9992c5c..13a30c72 100644
--- a/src/ClosedLoop/ClosedLoop.cpp
+++ b/src/ClosedLoop/ClosedLoop.cpp
@@ -122,7 +122,7 @@ GCodeResult ClosedLoop::StartDataCollection(DriverId driverId, GCodeBuffer& gb,
// Estimate how large the file will be
const unsigned int numVariables = Bitmap<uint32_t>(filterRequested).CountSetBits() + 1; // 1 extra for time stamp
- const uint32_t preallocSize = numSamplesRequested * ((numVariables * 9) + 4);
+ const uint32_t preallocSize = numSamplesRequested * ((numVariables * 8) + 4); // assume format "xxx.xxx," for most samples
// Create the file
String<StringLength50> tempFilename;
@@ -190,7 +190,7 @@ void ClosedLoop::ProcessReceivedData(CanAddress src, const CanMessageClosedLoopD
currentLine.printf("%u", msg.firstSampleNumber + sampleIndex);
for (size_t i = 0; i < variableCount; i++)
{
- currentLine.catf(",%.5f", (double)msg.data[sampleIndex*variableCount + i]);
+ currentLine.catf(",%.2f", (double)msg.data[sampleIndex*variableCount + i]);
}
currentLine.cat("\n");