Add Units schemaTranslate for Unit::Velocity.

Independent of scale, use only mm/min or in/min because it is compatible
with GCODE feed rate units.
(My use case is definition os feed-rates in PathLoadTool.py).
This commit is contained in:
Itai Nahshon
2017-06-16 14:54:18 +03:00
committed by wmayer
parent b5a82693ce
commit a42391fa3b
4 changed files with 24 additions and 0 deletions

View File

@@ -163,6 +163,10 @@ QString UnitsSchemaInternal::schemaTranslate(const Quantity &quant, double &fact
unitString = QString::fromLatin1("W/m^2");
factor = 1.0;
}
else if (unit == Unit::Velocity) {
unitString = QString::fromLatin1("mm/min");
factor = 1.0/60;
}
else {
// default action for all cases without special treatment:
unitString = quant.getUnit().getString();