Fix in code definition of hpa.
In current code hpa is indirectly defined as 10^5 pascals. The present commit indirectly defines it as 10^2 pascals.
This commit is contained in:
parent
7a7b875b58
commit
fb6da32cec
3 changed files with 17 additions and 17 deletions
|
@ -103,7 +103,7 @@ var staticPressure = "systems/static/pressure-inhg";
|
|||
var pressureUnits = { "inHg" : 0, "hPa" : 1 };
|
||||
var baroSettingUnit = pressureUnits["inHg"];
|
||||
var baroSettingInhg = 29.92;
|
||||
var baroSettingHpa = baroSettingInhg * 0.03386389;
|
||||
var baroSettingHpa = baroSettingInhg * 33.86389;
|
||||
var baroSettingAdjusting = 0;
|
||||
var baroButtonDown = 0;
|
||||
var baroTimerRunning = 0;
|
||||
|
@ -1542,7 +1542,7 @@ var adjustBaroSettingInhg = func(amount) {
|
|||
# Adjust baro setting inHg by amount,
|
||||
# and sync baro setting hPa.
|
||||
baroSettingInhg = baroSettingInhg + amount;
|
||||
baroSettingHpa = baroSettingInhg * 0.03386389;
|
||||
baroSettingHpa = baroSettingInhg * 33.86389;
|
||||
|
||||
settingBaroSettingHpa.setDoubleValue(baroSettingHpa);
|
||||
settingBaroSettingInhg.setDoubleValue(baroSettingInhg);
|
||||
|
@ -1553,7 +1553,7 @@ var adjustbaroSettingHpa = func(amount) {
|
|||
# Adjust baro setting hPa by amount,
|
||||
# and sync baro setting inHg.
|
||||
baroSettingHpa = baroSettingHpa + amount;
|
||||
baroSettingInhg = baroSettingHpa / 0.03386389;
|
||||
baroSettingInhg = baroSettingHpa / 33.86389;
|
||||
|
||||
settingBaroSettingHpa.setDoubleValue(baroSettingHpa);
|
||||
settingBaroSettingInhg.setDoubleValue(baroSettingInhg);
|
||||
|
@ -1574,7 +1574,7 @@ var knobSmallUp = func {
|
|||
}
|
||||
elsif (baroSettingUnit == pressureUnits["hPa"])
|
||||
{
|
||||
adjustbaroSettingHpa(0.001);
|
||||
adjustbaroSettingHpa(1);
|
||||
}
|
||||
}
|
||||
elsif (baroTimerRunning == 0 and
|
||||
|
@ -1616,7 +1616,7 @@ var knobLargeUp = func {
|
|||
}
|
||||
elsif (baroSettingUnit == pressureUnits["hPa"])
|
||||
{
|
||||
adjustbaroSettingHpa(0.1);
|
||||
adjustbaroSettingHpa(100);
|
||||
}
|
||||
}
|
||||
elsif (baroTimerRunning == 0 and
|
||||
|
@ -1658,7 +1658,7 @@ var knobSmallDown = func {
|
|||
}
|
||||
elsif (baroSettingUnit == pressureUnits["hPa"])
|
||||
{
|
||||
adjustbaroSettingHpa(-0.001);
|
||||
adjustbaroSettingHpa(-1);
|
||||
}
|
||||
}
|
||||
elsif (baroTimerRunning == 0 and
|
||||
|
@ -1700,7 +1700,7 @@ var knobLargeDown = func {
|
|||
}
|
||||
elsif (baroSettingUnit == pressureUnits["hPa"])
|
||||
{
|
||||
adjustbaroSettingHpa(-0.1);
|
||||
adjustbaroSettingHpa(-100);
|
||||
}
|
||||
}
|
||||
elsif (baroTimerRunning == 0 and
|
||||
|
|
|
@ -496,8 +496,8 @@ properties' values.
|
|||
<type>textranslate</type>
|
||||
<object-name>hpa-digit2</object-name>
|
||||
<property>/autopilot/KAP140/settings/baro-setting-hpa</property>
|
||||
<factor>0.1</factor>
|
||||
<step>1</step>
|
||||
<factor>0.0001</factor>
|
||||
<step>1000</step>
|
||||
<bias>0.0005</bias>
|
||||
<axis>
|
||||
<x>1</x>
|
||||
|
@ -509,8 +509,8 @@ properties' values.
|
|||
<type>textranslate</type>
|
||||
<object-name>hpa-digit3</object-name>
|
||||
<property>/autopilot/KAP140/settings/baro-setting-hpa</property>
|
||||
<factor>1</factor>
|
||||
<step>0.1</step>
|
||||
<factor>0.001</factor>
|
||||
<step>100</step>
|
||||
<bias>0.0005</bias>
|
||||
<axis>
|
||||
<x>1</x>
|
||||
|
@ -522,8 +522,8 @@ properties' values.
|
|||
<type>textranslate</type>
|
||||
<object-name>hpa-digit4</object-name>
|
||||
<property>/autopilot/KAP140/settings/baro-setting-hpa</property>
|
||||
<factor>10</factor>
|
||||
<step>0.01</step>
|
||||
<factor>0.010</factor>
|
||||
<step>10</step>
|
||||
<bias>0.0005</bias>
|
||||
<axis>
|
||||
<x>1</x>
|
||||
|
@ -535,8 +535,8 @@ properties' values.
|
|||
<type>textranslate</type>
|
||||
<object-name>hpa-digit5</object-name>
|
||||
<property>/autopilot/KAP140/settings/baro-setting-hpa</property>
|
||||
<factor>100</factor>
|
||||
<step>0.001</step>
|
||||
<factor>0.100</factor>
|
||||
<step>1</step>
|
||||
<bias>0.0005</bias>
|
||||
<axis>
|
||||
<x>1</x>
|
||||
|
|
|
@ -757,7 +757,7 @@ properties' values.
|
|||
<type>number-value</type>
|
||||
<property>/autopilot/KAP140/settings/baro-setting-hpa</property>
|
||||
<scale>1</scale>
|
||||
<format>%01.3f</format>
|
||||
<format>%04.0f</format>
|
||||
</chunk>
|
||||
</chunks>
|
||||
<transformations>
|
||||
|
@ -1028,4 +1028,4 @@ properties' values.
|
|||
|
||||
</actions>
|
||||
|
||||
</PropertyList>
|
||||
</PropertyList>
|
||||
|
|
Loading…
Reference in a new issue