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:
Diffstat (limited to 'src/GCodes/GCodeBuffer/BinaryParser.cpp')
-rw-r--r--src/GCodes/GCodeBuffer/BinaryParser.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/GCodes/GCodeBuffer/BinaryParser.cpp b/src/GCodes/GCodeBuffer/BinaryParser.cpp
index 1e333b9e..f929f462 100644
--- a/src/GCodes/GCodeBuffer/BinaryParser.cpp
+++ b/src/GCodes/GCodeBuffer/BinaryParser.cpp
@@ -754,7 +754,7 @@ void BinaryParser::WriteParameters(const StringRef& s, bool quoteStrings) const
}
}
-void BinaryParser::SetParameters(VariableSet& vs, int codeRunning) noexcept
+void BinaryParser::AddParameters(VariableSet& vs, int codeRunning) noexcept
{
if (bufferLength != 0 && header->numParameters != 0)
{
@@ -773,7 +773,7 @@ void BinaryParser::SetParameters(VariableSet& vs, int codeRunning) noexcept
{
case DataType::String:
{
- StringHandle sh(seenParameterValue, seenParameter->intValue);
+ StringHandle sh(seenParameterValue, param->intValue);
ev.Set(sh);
}
break;
@@ -781,22 +781,22 @@ void BinaryParser::SetParameters(VariableSet& vs, int codeRunning) noexcept
case DataType::Expression:
try
{
- ExpressionParser parser(gb, seenParameterValue, seenParameterValue + seenParameter->intValue, -1);
- ev.Set(parser.ParseFloat());
+ ExpressionParser parser(gb, seenParameterValue, seenParameterValue + param->intValue, -1);
+ ev = parser.Parse();
}
- catch (const GCodeException&) { }
+ catch (const GCodeException&) { } // TODO error handling
break;
case DataType::Float:
- ev.Set(seenParameter->floatValue);
+ ev.Set(param->floatValue);
break;
case DataType::Int:
- ev.Set(seenParameter->intValue);
+ ev.Set(param->intValue);
break;
case DataType::UInt:
- ev.Set((int32_t)seenParameter->uintValue);
+ ev.Set((int32_t)param->uintValue);
break;
default:
@@ -824,7 +824,6 @@ void BinaryParser::SetParameters(VariableSet& vs, int codeRunning) noexcept
}
}
}
- //TODO
}
GCodeException BinaryParser::ConstructParseException(const char *str) const noexcept