Fix 'value1 = 0" in PageRudderPosition
This commit is contained in:
parent
3d31fcf4ed
commit
fb89dca3be
|
@ -46,11 +46,11 @@ public:
|
||||||
bool valid1 = bvalue1->valid; // Valid information
|
bool valid1 = bvalue1->valid; // Valid information
|
||||||
String svalue1 = formatValue(bvalue1, *commonData).svalue; // Formatted value as string including unit conversion and switching decimal places
|
String svalue1 = formatValue(bvalue1, *commonData).svalue; // Formatted value as string including unit conversion and switching decimal places
|
||||||
String unit1 = formatValue(bvalue1, *commonData).unit; // Unit of value
|
String unit1 = formatValue(bvalue1, *commonData).unit; // Unit of value
|
||||||
|
|
||||||
if(valid1 == true){
|
if(valid1 == true){
|
||||||
value1old = value1; // Save old value
|
value1old = value1; // Save old value
|
||||||
unit1old = unit1; // Save old unit
|
unit1old = unit1; // Save old unit
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if(simulation == true){
|
if(simulation == true){
|
||||||
value1 = (3 + float(random(0, 50)) / 10.0)/360*2*PI;
|
value1 = (3 + float(random(0, 50)) / 10.0)/360*2*PI;
|
||||||
unit1 = "Deg";
|
unit1 = "Deg";
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
else{
|
else{
|
||||||
value1 = 0;
|
value1 = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Optical warning by limit violation (unused)
|
// Optical warning by limit violation (unused)
|
||||||
if(String(flashLED) == "Limit Violation"){
|
if(String(flashLED) == "Limit Violation"){
|
||||||
|
|
Loading…
Reference in New Issue