Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed "Sonar Range" units #2805

Merged
merged 1 commit into from Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions ExtLibs/ArduPilot/CurrentState.cs
Expand Up @@ -1526,10 +1526,10 @@ public float AZToMAV
}
}

[DisplayText("Sonar Range (meters)")]
[DisplayText("Sonar Range (alt)")]
public float sonarrange
{
get => (float)toDistDisplayUnit(_sonarrange);
get => (float)toAltDisplayUnit(_sonarrange);
set => _sonarrange = value;
}

Expand Down Expand Up @@ -3520,6 +3520,11 @@ public static double toDistDisplayUnit(double input)
return input * multiplierdist;
}

public static double toAltDisplayUnit(double input)
{
return input * multiplieralt;
}

public static double toSpeedDisplayUnit(double input)
{
return input * multiplierspeed;
Expand Down
4 changes: 2 additions & 2 deletions ExtLibs/Utilities/Resources/strings_zhHans.txt
Expand Up @@ -73,7 +73,7 @@ Distance to Home (dist)=家的距离 (dist)
Distance From Moving Base (dist)=流动站的距离 (dist)
Elevation to Mav (deg)=到飞行器的仰角 (deg)
Bearing to Mav (deg)=到飞行器的方位 (deg)
Sonar Range (meters)=声纳距离 (meters)
Sonar Range (alt)=声纳距离 (alt)
Sonar Voltage (Volt)=声纳电压 (Volt)
3DR Radio rssi=3DR电台信号强度
3DR Radio remote rssi=3DR电台遥控信号强度
Expand All @@ -90,4 +90,4 @@ flow_comp_m_x=光流_comp_m_x*
flow_comp_m_y=光流_comp_m_y*
flow_x=光流_x*
flow_y=光流_y*
flow quality=光流质量*
flow quality=光流质量*