docs: publish channels: main api

This commit is contained in:
github-actions[bot] committed 2026-08-28 13:13:48 +00:00
1 parent 09f7deefa4
commit e16afbd81d
24 files changed
+160 -28

No files matched your search

@@ -260,7 +260,7 @@
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:common/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="wind-speed.html"><span class="token function">windSpeed</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">metersPerSecond<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">, </span></span><span class="parameter ">isImperial<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">decimalPlaces<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">1</span></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:common/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="wind-speed.html"><span class="token function">windSpeed</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">metersPerSecond<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">, </span></span><span class="parameter ">isImperial<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">decimalPlaces<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">1</span></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></div><div class="brief "><p class="paragraph">Wind arrives from the sensor in m/s and is shown in the unit a reader expects for weather: km/h for metric, mph for imperial. m/s is the meteorological observation standard, but public forecasts across most metric regions quote km/h, so that is what the app displays. The charts convert the same way — see <code class="lang-kotlin">chartValue</code> — so a reading reads identically on the node card and on its graph.</p></div></div></div>
</div>
</div>
</div>
@@ -94,7 +94,7 @@
<div class="cover ">
<h1 class="cover"><span><span>rainfall</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:common/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="rainfall.html"><span class="token function">rainfall</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">millimeters<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">, </span></span><span class="parameter ">isImperial<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">decimalPlaces<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">1</span></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/common/src/commonMain/kotlin/org/meshtastic/core/common/util/MetricFormatter.kt#L72">source</a>)</span></span></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:common/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="rainfall.html"><span class="token function">rainfall</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">millimeters<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">, </span></span><span class="parameter ">isImperial<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">decimalPlaces<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">1</span></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/common/src/commonMain/kotlin/org/meshtastic/core/common/util/MetricFormatter.kt#L78">source</a>)</span></span></div></div></div>
</div>
<div class="footer">
<div class="footer--container">
@@ -94,7 +94,7 @@
<div class="cover ">
<h1 class="cover"><span><span>weight</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:common/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="weight.html"><span class="token function">weight</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">kilograms<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">, </span></span><span class="parameter ">isImperial<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">decimalPlaces<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">2</span></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/common/src/commonMain/kotlin/org/meshtastic/core/common/util/MetricFormatter.kt#L78">source</a>)</span></span></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:common/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="weight.html"><span class="token function">weight</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">kilograms<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">, </span></span><span class="parameter ">isImperial<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">decimalPlaces<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">2</span></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/common/src/commonMain/kotlin/org/meshtastic/core/common/util/MetricFormatter.kt#L84">source</a>)</span></span></div></div></div>
</div>
<div class="footer">
<div class="footer--container">
@@ -94,7 +94,7 @@
<div class="cover ">
<h1 class="cover"><span>wind</span><wbr><span><span>Speed</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:common/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="wind-speed.html"><span class="token function">windSpeed</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">metersPerSecond<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">, </span></span><span class="parameter ">isImperial<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">decimalPlaces<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">1</span></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/common/src/commonMain/kotlin/org/meshtastic/core/common/util/MetricFormatter.kt#L66">source</a>)</span></span></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:common/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="wind-speed.html"><span class="token function">windSpeed</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">metersPerSecond<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">, </span></span><span class="parameter ">isImperial<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">decimalPlaces<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">1</span></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/common/src/commonMain/kotlin/org/meshtastic/core/common/util/MetricFormatter.kt#L72">source</a>)</span></span></div><p class="paragraph">Wind arrives from the sensor in m/s and is shown in the unit a reader expects for weather: km/h for metric, mph for imperial. m/s is the meteorological observation standard, but public forecasts across most metric regions quote km/h, so that is what the app displays. The charts convert the same way — see <code class="lang-kotlin">chartValue</code> — so a reading reads identically on the node card and on its graph.</p></div></div>
</div>
<div class="footer">
<div class="footer--container">
@@ -94,7 +94,7 @@
<div class="cover ">
<h1 class="cover"><span>calculate</span><wbr><span>Dew</span><wbr><span><span>Point</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:model/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="calculate-dew-point.html"><span class="token function">calculateDewPoint</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">tempCelsius<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">, </span></span><span class="parameter ">humidity<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/model/src/commonMain/kotlin/org/meshtastic/core/model/util/UnitConversions.kt#L54">source</a>)</span></span></div><p class="paragraph">Calculated the dew point based on the Magnus-Tetens approximation which is a widely used formula for calculating dew point temperature.</p></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:model/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="calculate-dew-point.html"><span class="token function">calculateDewPoint</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">tempCelsius<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">, </span></span><span class="parameter ">humidity<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/model/src/commonMain/kotlin/org/meshtastic/core/model/util/UnitConversions.kt#L57">source</a>)</span></span></div><p class="paragraph">Calculated the dew point based on the Magnus-Tetens approximation which is a widely used formula for calculating dew point temperature.</p></div></div>
</div>
<div class="footer">
<div class="footer--container">
@@ -130,6 +130,21 @@
</div>
</div>
</div>
<a data-name="-1670682289%2FFunctions%2F394437785" anchor-label="metersPerSecondToKph" id="-1670682289%2FFunctions%2F394437785" data-filterable-set=":core:model/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":core:model/commonMain" data-filterable-set=":core:model/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="meters-per-second-to-kph.html"><span>meters</span><wbr><span>Per</span><wbr><span>Second</span><wbr><span>To</span><wbr><span><span>Kph</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1670682289%2FFunctions%2F394437785"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:model/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="meters-per-second-to-kph.html"><span class="token function">metersPerSecondToKph</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">metersPerSecond<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a></div></div></div>
</div>
</div>
</div>
</div>
<a data-name="1252477709%2FFunctions%2F394437785" anchor-label="metersPerSecondToMph" id="1252477709%2FFunctions%2F394437785" data-filterable-set=":core:model/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":core:model/commonMain" data-filterable-set=":core:model/commonMain">
<div class="main-subrow keyValue ">
@@ -0,0 +1,117 @@
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<title>metersPerSecondToKph</title>
<link href="../../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../../";</script>
<script>document.documentElement.classList.replace("no-js", "js");</script>
<script>const storage = localStorage.getItem("dokka-dark-mode")
if (storage == null) {
const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
if (osDarkSchemePreferred === true) {
document.getElementsByTagName("html")[0].classList.add("theme-dark")
}
} else {
const savedDarkMode = JSON.parse(storage)
if (savedDarkMode === true) {
document.getElementsByTagName("html")[0].classList.add("theme-dark")
}
}
</script>
<script type="text/javascript" src="../../../../scripts/sourceset_dependencies.js" async></script>
<link href="../../../../styles/style.css" rel="Stylesheet">
<link href="../../../../styles/main.css" rel="Stylesheet">
<link href="../../../../styles/prism.css" rel="Stylesheet">
<link href="../../../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../../../ui-kit/ui-kit.min.css" rel="Stylesheet">
<script type="text/javascript" src="../../../../scripts/safe-local-storage_blocking.js"></script>
<script type="text/javascript" src="../../../../scripts/navigation-loader.js" async></script>
<script type="text/javascript" src="../../../../scripts/platform-content-handler.js" async></script>
<script type="text/javascript" src="../../../../scripts/main.js" defer></script>
<script type="text/javascript" src="../../../../scripts/prism.js" async></script>
<script type="text/javascript" src="../../../../ui-kit/ui-kit.min.js" defer></script></head>
<body>
<div class="root">
<header class="navigation theme-dark" id="navigation-wrapper" role="banner">
<a class="library-name--link" href="../../../../index.html" tabindex="1">
Meshtastic App
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
<button class="platform-tag platform-selector common-like" data-active="" aria-pressed="true" data-filter=":core:model/commonMain">common</button>
<div class="dropdown filter-section--dropdown" data-role="dropdown" id="filter-section-dropdown">
<button class="button button_dropdown filter-section--dropdown-toggle" role="combobox" data-role="dropdown-toggle" aria-controls="platform-tags-listbox" aria-haspopup="listbox" aria-expanded="false" aria-label="Toggle source sets"></button>
<ul role="listbox" id="platform-tags-listbox" class="dropdown--list" data-role="dropdown-listbox" aria-label="Target filter">
<div class="dropdown--header"><span>Target filter</span>
<button class="button" data-role="dropdown-toggle" aria-label="Close target filter">
<i class="ui-kit-icon ui-kit-icon_cross"></i>
</button>
</div>
<li role="option" class="dropdown--option platform-selector-option common-like" tabindex="0">
<label class="checkbox">
<input type="checkbox" class="checkbox--input" id=":core:model/commonMain" data-filter=":core:model/commonMain">
<span class="checkbox--icon"></span>
common
</label>
</li>
</ul>
<div class="dropdown--overlay"></div>
</div>
</ul>
<button class="navigation-controls--btn navigation-controls--btn_theme" id="theme-toggle-button" type="button">Switch theme
</button>
<div class="navigation-controls--btn navigation-controls--btn_search" id="searchBar" role="button">Search in
API
</div>
</div>
</header>
<div id="container">
<nav id="leftColumn" class="sidebar" data-item-type="SECTION" data-item-config="{&quot;defaultSize&quot;: 280, &quot;minSize&quot;: 200, &quot;maxSize&quot;: 400}">
<a class="toc--skip-link" href="#main">Skip to content</a>
<div class="dropdown theme-dark_mobile" data-role="dropdown" id="toc-dropdown">
<ul role="listbox" id="toc-listbox" class="dropdown--list dropdown--list_toc-list" data-role="dropdown-listbox" aria-label="Table of contents">
<div class="dropdown--header">
<span>
Meshtastic App
</span>
<button class="button" data-role="dropdown-toggle" aria-label="Close table of contents">
<i class="ui-kit-icon ui-kit-icon_cross"></i>
</button>
</div>
<div class="sidebar--inner" id="sideMenu"></div>
</ul>
<div class="dropdown--overlay"></div>
</div>
</nav>
<div id="resizer" class="resizer" data-item-type="BAR"></div>
<div id="main" data-item-type="SECTION" role="main">
<div class="main-content" data-page-type="member" id="content" pageids="core-model::org.meshtastic.core.model.util/UnitConversions/metersPerSecondToKph/#kotlin.Float/PointingToDeclaration//394437785">
<div class="breadcrumbs"><a href="../../index.html">core-model</a><span class="delimiter">/</span><a href="../index.html">org.meshtastic.core.model.util</a><span class="delimiter">/</span><a href="index.html">UnitConversions</a><span class="delimiter">/</span><span class="current">metersPerSecondToKph</span></div>
<div class="cover ">
<h1 class="cover"><span>meters</span><wbr><span>Per</span><wbr><span>Second</span><wbr><span>To</span><wbr><span><span>Kph</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:model/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="meters-per-second-to-kph.html"><span class="token function">metersPerSecondToKph</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">metersPerSecond<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/model/src/commonMain/kotlin/org/meshtastic/core/model/util/UnitConversions.kt#L31">source</a>)</span></span></div></div></div>
</div>
<div class="footer">
<div class="footer--container">
<a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
<div class="footer--content">
<div>
<span>Generated by </span>
<a class="footer--link footer--link_external" href="https://github.com/Kotlin/dokka">
Dokka
</a>
<div>© 2026 Copyright</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
@@ -94,7 +94,7 @@
<div class="cover ">
<h1 class="cover"><span>to</span><wbr><span>Temp</span><wbr><span><span>String</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:model/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">.</span><a href="to-temp-string.html"><span class="token function">toTempString</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">isFahrenheit<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/model/src/commonMain/kotlin/org/meshtastic/core/model/util/UnitConversions.kt#L31">source</a>)</span></span></div><p class="paragraph">Formats temperature as a string with the unit suffix.</p></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:model/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html">Float</a><span class="token punctuation">.</span><a href="to-temp-string.html"><span class="token function">toTempString</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">isFahrenheit<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/model/src/commonMain/kotlin/org/meshtastic/core/model/util/UnitConversions.kt#L34">source</a>)</span></span></div><p class="paragraph">Formats temperature as a string with the unit suffix.</p></div></div>
</div>
<div class="footer">
<div class="footer--container">
@@ -95,7 +95,7 @@
<h1 class="cover"><span>Robolectric</span><wbr><span>Ble</span><wbr><span><span>Bonding</span></span></h1>
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark" data-filterable-current=":core:testing/androidMain" data-filterable-set=":core:testing/androidMain" data-active="" data-toggle=":core:testing/androidMain">android</button></div>
<div class="content sourceset-dependent-content" data-active="" data-togglable=":core:testing/androidMain"><div class="symbol monospace"><span class="token keyword">object </span><a href="index.html">RobolectricBleBonding</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/testing/src/androidMain/kotlin/org/meshtastic/core/testing/RobolectricBleBonding.kt#L44">source</a>)</span></span></div><p class="paragraph">Reusable Robolectric helpers for driving Android Bluetooth bonding logic in <code class="lang-kotlin">androidHostTest</code> source sets.</p><p class="paragraph">These let a unit test exercise the real <code class="lang-kotlin">AndroidBluetoothRepository.bond()</code> (and any future BLE bonding code) without an emulator and without a production seam. They rely on two Robolectric behaviors (verified against Robolectric 4.16.x):</p><ul><li><p class="paragraph"><a href="https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothAdapter.html#getremotedevice">android.bluetooth.BluetoothAdapter.getRemoteDevice</a> caches the returned <a href="https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothDevice.html">BluetoothDevice</a> by address in a static map, so the shadow configured here is the <i>same</i> instance production code reads when it calls <code class="lang-kotlin">getRemoteDevice(mac)</code> internally.</p></li><li><p class="paragraph"><span data-unresolved-link="org.robolectric.shadows/ShadowBluetoothDevice/createBond/#/PointingToDeclaration/">ShadowBluetoothDevice.createBond</span> calls <code class="lang-kotlin">checkForBluetoothConnectPermission()</code> first, so tests must call <a href="grant-bluetooth-connect-permission.html">grantBluetoothConnectPermission</a> or <code class="lang-kotlin">createBond()</code> throws <a href="https://developer.android.com/reference/kotlin/java/lang/SecurityException.html">SecurityException</a> instead of returning a value.</p></li></ul><p class="paragraph">Isolation note: because the device cache is static and survives across tests in the same JVM, give each test a distinct MAC so bond-state cannot bleed between tests.</p></div> </div>
<div class="content sourceset-dependent-content" data-active="" data-togglable=":core:testing/androidMain"><div class="symbol monospace"><span class="token keyword">object </span><a href="index.html">RobolectricBleBonding</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/testing/src/androidMain/kotlin/org/meshtastic/core/testing/RobolectricBleBonding.kt#L44">source</a>)</span></span></div><p class="paragraph">Reusable Robolectric helpers for driving Android Bluetooth bonding logic in <code class="lang-kotlin">androidHostTest</code> source sets.</p><p class="paragraph">These let a unit test exercise the real <code class="lang-kotlin">AndroidBluetoothRepository.bond()</code> (and any future BLE bonding code) without an emulator and without a production seam. They rely on two Robolectric behaviors (verified against Robolectric 4.16.x):</p><ul><li><p class="paragraph"><a href="https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothAdapter.html#getRemoteDevice(kotlin.ByteArray)">android.bluetooth.BluetoothAdapter.getRemoteDevice</a> caches the returned <a href="https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothDevice.html">BluetoothDevice</a> by address in a static map, so the shadow configured here is the <i>same</i> instance production code reads when it calls <code class="lang-kotlin">getRemoteDevice(mac)</code> internally.</p></li><li><p class="paragraph"><span data-unresolved-link="org.robolectric.shadows/ShadowBluetoothDevice/createBond/#/PointingToDeclaration/">ShadowBluetoothDevice.createBond</span> calls <code class="lang-kotlin">checkForBluetoothConnectPermission()</code> first, so tests must call <a href="grant-bluetooth-connect-permission.html">grantBluetoothConnectPermission</a> or <code class="lang-kotlin">createBond()</code> throws <a href="https://developer.android.com/reference/kotlin/java/lang/SecurityException.html">SecurityException</a> instead of returning a value.</p></li></ul><p class="paragraph">Isolation note: because the device cache is static and survives across tests in the same JVM, give each test a distinct MAC so bond-state cannot bleed between tests.</p></div> </div>
</div>
<div class="tabbedcontent">
<div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="CONSTRUCTOR,TYPE,PROPERTY,FUNCTION">Members</button></div>
@@ -94,7 +94,7 @@
<div class="cover ">
<h1 class="cover"><span>Environment</span><wbr><span>Metrics</span><wbr><span><span>Chart</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":feature:node/commonMain"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html"><span class="token annotation builtin">Composable</span></a></div></div><span class="token keyword">fun </span><a href="-environment-metrics-chart.html"><span class="token function">EnvironmentMetricsChart</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">modifier<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.html">Modifier</a><span class="token operator"> = </span>Modifier<span class="token punctuation">, </span></span><span class="parameter ">telemetries<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html">List</a><span class="token operator">&lt;</span><span data-unresolved-link="org.meshtastic.proto/Telemetry///PointingToDeclaration/">Telemetry</span><span class="token operator">&gt;</span><span class="token punctuation">, </span></span><span class="parameter ">graphData<span class="token operator">: </span><a href="-environment-graphing-data/index.html">EnvironmentGraphingData</a><span class="token punctuation">, </span></span><span class="parameter ">isFahrenheit<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">isImperial<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">vicoScrollState<span class="token operator">: </span><span data-unresolved-link="com.patrykandpatrick.vico.compose.cartesian/VicoScrollState///PointingToDeclaration/">VicoScrollState</span><span class="token punctuation">, </span></span><span class="parameter ">selectedX<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html">Double</a><span class="token operator">?</span><span class="token punctuation">, </span></span><span class="parameter ">onPointSelected<span class="token operator">: </span><span class="token punctuation">(</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html">Double</a><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/EnvironmentCharts.kt#L186">source</a>)</span></span></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":feature:node/commonMain"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html"><span class="token annotation builtin">Composable</span></a></div></div><span class="token keyword">fun </span><a href="-environment-metrics-chart.html"><span class="token function">EnvironmentMetricsChart</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">modifier<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.html">Modifier</a><span class="token operator"> = </span>Modifier<span class="token punctuation">, </span></span><span class="parameter ">telemetries<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html">List</a><span class="token operator">&lt;</span><span data-unresolved-link="org.meshtastic.proto/Telemetry///PointingToDeclaration/">Telemetry</span><span class="token operator">&gt;</span><span class="token punctuation">, </span></span><span class="parameter ">graphData<span class="token operator">: </span><a href="-environment-graphing-data/index.html">EnvironmentGraphingData</a><span class="token punctuation">, </span></span><span class="parameter ">isFahrenheit<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">isImperial<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token punctuation">, </span></span><span class="parameter ">vicoScrollState<span class="token operator">: </span><span data-unresolved-link="com.patrykandpatrick.vico.compose.cartesian/VicoScrollState///PointingToDeclaration/">VicoScrollState</span><span class="token punctuation">, </span></span><span class="parameter ">selectedX<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html">Double</a><span class="token operator">?</span><span class="token punctuation">, </span></span><span class="parameter ">onPointSelected<span class="token operator">: </span><span class="token punctuation">(</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html">Double</a><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/EnvironmentCharts.kt#L192">source</a>)</span></span></div></div></div>
</div>
<div class="footer">
<div class="footer--container">
@@ -94,7 +94,7 @@
<div class="cover ">
<h1 class="cover"><span>Environment</span><wbr><span>Metrics</span><wbr><span><span>Screen</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":feature:node/commonMain"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html"><span class="token annotation builtin">Composable</span></a></div></div><span class="token keyword">fun </span><a href="-environment-metrics-screen.html"><span class="token function">EnvironmentMetricsScreen</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">viewModel<span class="token operator">: </span><a href="-metrics-view-model/index.html">MetricsViewModel</a><span class="token punctuation">, </span></span><span class="parameter ">onNavigateUp<span class="token operator">: </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/EnvironmentMetrics.kt#L85">source</a>)</span></span></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":feature:node/commonMain"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html"><span class="token annotation builtin">Composable</span></a></div></div><span class="token keyword">fun </span><a href="-environment-metrics-screen.html"><span class="token function">EnvironmentMetricsScreen</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">viewModel<span class="token operator">: </span><a href="-metrics-view-model/index.html">MetricsViewModel</a><span class="token punctuation">, </span></span><span class="parameter ">onNavigateUp<span class="token operator">: </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/EnvironmentMetrics.kt#L97">source</a>)</span></span></div></div></div>
</div>
<div class="footer">
<div class="footer--container">
@@ -94,7 +94,7 @@
<div class="cover ">
<h1 class="cover"><span>Preview</span><wbr><span>Environment</span><wbr><span>Metrics</span><wbr><span><span>Content</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":feature:node/commonMain"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html"><span class="token annotation builtin">Composable</span></a></div></div><span class="token keyword">fun </span><a href="-preview-environment-metrics-content.html"><span class="token function">PreviewEnvironmentMetricsContent</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/EnvironmentMetrics.kt#L598">source</a>)</span></span></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":feature:node/commonMain"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html"><span class="token annotation builtin">Composable</span></a></div></div><span class="token keyword">fun </span><a href="-preview-environment-metrics-content.html"><span class="token function">PreviewEnvironmentMetricsContent</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/EnvironmentMetrics.kt#L617">source</a>)</span></span></div></div></div>
</div>
<div class="footer">
<div class="footer--container">
File diff suppressed because one or more lines are too long.
File diff suppressed because one or more lines are too long.
File diff suppressed because one or more lines are too long.
File diff suppressed because one or more lines are too long.
File diff suppressed because one or more lines are too long.
File diff suppressed because one or more lines are too long.
+3 -3
View File
@@ -18586,7 +18586,7 @@
},"2655": {
"doc": "Measurement & Formatting",
"title": "MetricFormatter API",
"content": "MetricFormatter is a Kotlin object with pure functions for each measurement type: . object MetricFormatter { fun temperature(celsius: Float, isFahrenheit: Boolean): String fun voltage(volts: Float, decimalPlaces: Int = 2): String fun current(milliAmps: Float, decimalPlaces: Int = 1): String fun percent(value: Float, decimalPlaces: Int = 1): String fun humidity(value: Float): String fun pressure(hPa: Float, decimalPlaces: Int = 1): String fun snr(value: Float, decimalPlaces: Int = 1): String fun rssi(value: Int): String fun windSpeed(metersPerSecond: Float, isImperial: Boolean, decimalPlaces: Int = 1): String fun rainfall(millimeters: Float, isImperial: Boolean, decimalPlaces: Int = 1): String } . Usage . // Temperature — Fahrenheit conversion is handled automatically MetricFormatter.temperature(22.5f, isFahrenheit = true) // \"72.5°F\" MetricFormatter.temperature(22.5f, isFahrenheit = false) // \"22.5°C\" // Signal metrics MetricFormatter.snr(-5.2f) // \"-5.2 dB\" MetricFormatter.rssi(-97) // \"-97 dBm\" // Environment MetricFormatter.pressure(1013.25f) // \"1013.3 hPa\" MetricFormatter.humidity(65.0f) // \"65%\" MetricFormatter.windSpeed(3.7f, isImperial = false) // \"3.7 m/s\" MetricFormatter.windSpeed(3.7f, isImperial = true) // \"8.3 mph\" MetricFormatter.rainfall(12.3f, isImperial = false) // \"12.3 mm\" MetricFormatter.rainfall(12.3f, isImperial = true) // \"0.5 in\" // Power MetricFormatter.voltage(3.95f) // \"3.95 V\" MetricFormatter.current(125.0f) // \"125.0 mA\" . ",
"content": "MetricFormatter is a Kotlin object with pure functions for each measurement type: . object MetricFormatter { fun temperature(celsius: Float, isFahrenheit: Boolean): String fun voltage(volts: Float, decimalPlaces: Int = 2): String fun current(milliAmps: Float, decimalPlaces: Int = 1): String fun percent(value: Float, decimalPlaces: Int = 1): String fun humidity(value: Float): String fun pressure(hPa: Float, decimalPlaces: Int = 1): String fun snr(value: Float, decimalPlaces: Int = 1): String fun rssi(value: Int): String fun windSpeed(metersPerSecond: Float, isImperial: Boolean, decimalPlaces: Int = 1): String fun rainfall(millimeters: Float, isImperial: Boolean, decimalPlaces: Int = 1): String } . Usage . // Temperature — Fahrenheit conversion is handled automatically MetricFormatter.temperature(22.5f, isFahrenheit = true) // \"72.5°F\" MetricFormatter.temperature(22.5f, isFahrenheit = false) // \"22.5°C\" // Signal metrics MetricFormatter.snr(-5.2f) // \"-5.2 dB\" MetricFormatter.rssi(-97) // \"-97 dBm\" // Environment MetricFormatter.pressure(1013.25f) // \"1013.3 hPa\" MetricFormatter.humidity(65.0f) // \"65%\" MetricFormatter.windSpeed(3.7f, isImperial = false) // \"13.3 km/h\" MetricFormatter.windSpeed(3.7f, isImperial = true) // \"8.3 mph\" MetricFormatter.rainfall(12.3f, isImperial = false) // \"12.3 mm\" MetricFormatter.rainfall(12.3f, isImperial = true) // \"0.5 in\" // Power MetricFormatter.voltage(3.95f) // \"3.95 V\" MetricFormatter.current(125.0f) // \"125.0 mA\" . ",
"url": "/Meshtastic-Android/main/en/developer/measurement.html#metricformatter-api",
"relUrl": "/en/developer/measurement.html#metricformatter-api"
@@ -18600,7 +18600,7 @@
},"2657": {
"doc": "Measurement & Formatting",
"title": "Unit Conversion",
"content": "Three measurements convert away from metric for display, each gated by a boolean flag sourced from the users device locale or preferences: . | Measurement | Flag | Source | Conversion | . | temperature | isFahrenheit | getSystemTemperatureUnit() | °F = °C × 1.8 + 32 | . | windSpeed | isImperial | getSystemMeasurementSystem() | m/s × 2.23694 → mph | . | rainfall | isImperial | getSystemMeasurementSystem() | mm ÷ 25.4 → in | . The two source functions (in core/common/.../util/MeasurementSystem.kt) are deliberately separate: some locales mix systems (the UK uses miles for distance but Celsius for temperature), so temperature must never be derived from the distance unit. On Android, getSystemTemperatureUnit() delegates to androidx.core.text.util.LocalePreferences, which resolves CLDR locale data and honors the Android 14+ Regional preferences temperature override. The users in-app Units choice (UnitsOverride, stored in UiPrefs) is folded in by LocaleUnitsProvider, which is the only place display code takes units from — a Konsist rule (MeasurementSystemSourceTest) keeps direct reads of the OS resolution out of the rest of the codebase, because a direct read follows the locale but ignores the setting. A forced system carries its temperature with it (metric → °C, imperial → °F), overriding even an explicit OS regional temperature preference. Both functions resolve the locale the same way, in order: the ms Unicode extension (the Android 16+ Measurement system preference) wins outright; a locale with no region — the in-app language picker offers bare tags like en — takes its region from the system configuration rather than letting ICU guess one from the language; and anything still unclassified falls back to metric, never imperial. The Android and Desktop implementations share the region table and the override reader in commonMain, so the two clients cannot disagree about the same locale. Everything else (voltage, current, pressure, SNR, RSSI, humidity, percent) displays in its native metric units. The user-facing Units &amp; Locale page explains what end users see. ",
"content": "Three measurements convert away from metric for display, each gated by a boolean flag sourced from the users device locale or preferences: . | Measurement | Flag | Source | Conversion | . | temperature | isFahrenheit | getSystemTemperatureUnit() | °F = °C × 1.8 + 32 | . | windSpeed | isImperial | getSystemMeasurementSystem() | m/s × 3.6 → km/h, or × 2.23694 → mph | . | rainfall | isImperial | getSystemMeasurementSystem() | mm ÷ 25.4 → in | . The two source functions (in core/common/.../util/MeasurementSystem.kt) are deliberately separate: some locales mix systems (the UK uses miles for distance but Celsius for temperature), so temperature must never be derived from the distance unit. On Android, getSystemTemperatureUnit() delegates to androidx.core.text.util.LocalePreferences, which resolves CLDR locale data and honors the Android 14+ Regional preferences temperature override. The users in-app Units choice (UnitsOverride, stored in UiPrefs) is folded in by LocaleUnitsProvider, which is the only place display code takes units from — a Konsist rule (MeasurementSystemSourceTest) keeps direct reads of the OS resolution out of the rest of the codebase, because a direct read follows the locale but ignores the setting. A forced system carries its temperature with it (metric → °C, imperial → °F), overriding even an explicit OS regional temperature preference. Both functions resolve the locale the same way, in order: the ms Unicode extension (the Android 16+ Measurement system preference) wins outright; a locale with no region — the in-app language picker offers bare tags like en — takes its region from the system configuration rather than letting ICU guess one from the language; and anything still unclassified falls back to metric, never imperial. The Android and Desktop implementations share the region table and the override reader in commonMain, so the two clients cannot disagree about the same locale. Everything else (voltage, current, pressure, SNR, RSSI, humidity, percent) displays in its native metric units. The user-facing Units &amp; Locale page explains what end users see. ",
"url": "/Meshtastic-Android/main/en/developer/measurement.html#unit-conversion",
"relUrl": "/en/developer/measurement.html#unit-conversion"
@@ -45053,7 +45053,7 @@
},"6436": {
"doc": "Units, Measurement & Locale",
"title": "Wind",
"content": "Wind speed and gust data from environment sensors are transmitted as m/s and converted for display. | Your Setting | You See | . | Metric | 5 m/s | . | Imperial (US) | 11 mph | . Wind readings appear in the Node Detail environment section and the Environment Telemetry charts. ",
"content": "Wind speed, gust and lull are transmitted by the sensor as m/s and converted for display — the app shows the unit weather forecasts use in your region, not the raw sensor unit. | Your Setting | You See | . | Metric | 18.0 km/h | . | Imperial (US) | 11.2 mph | . Wind readings appear in the Node Detail environment section and the Environment Telemetry charts. ",
"url": "/Meshtastic-Android/main/en/user/units-and-locale.html#wind",
"relUrl": "/en/user/units-and-locale.html#wind"
+1 -1
View File
@@ -32,7 +32,7 @@ object NumberFormatter {
---|---|---|
`temperature` | `isFahrenheit` | `getSystemTemperatureUnit()` | `°F = °C × 1.8 + 32` |
`windSpeed` | `isImperial` | `getSystemMeasurementSystem()` | m/s × 2.23694 → mph |
`windSpeed` | `isImperial` | `getSystemMeasurementSystem()` | m/s × 3.6 → km/h, or × 2.23694 → mph |
`rainfall` | `isImperial` | `getSystemMeasurementSystem()` | mm ÷ 25.4 → in |
The two source functions (in `core/common/.../util/MeasurementSystem.kt`) are deliberately separate: some locales mix systems (the UK uses miles for distance but Celsius for temperature), so temperature must never be derived from the distance unit. On Android, `getSystemTemperatureUnit()` delegates to `androidx.core.text.util.LocalePreferences`, which resolves CLDR locale data and honors the Android 14+ Regional preferences temperature override.
+3 -3
View File
@@ -63,12 +63,12 @@ GPS ground speed is displayed in your locale's preferred speed unit.
## Wind
Wind speed and gust data from environment sensors are transmitted as **m/s** and converted for display.
Wind speed, gust and lull are transmitted by the sensor as **m/s** and converted for display — the app shows the unit weather forecasts use in your region, not the raw sensor unit.
Your Setting | You See |
---|---|
Metric | 5 m/s |
Imperial (US) | 11 mph |
Metric | 18.0 km/h |
Imperial (US) | 11.2 mph |
Wind readings appear in the **Node Detail** environment section and the **Environment Telemetry** charts.
File diff suppressed because one or more lines are too long.
File diff suppressed because one or more lines are too long.
+2 -2
View File
@@ -19,13 +19,13 @@
{"id":"tak","title":"TAK Integration","section":"user","locale":"en","resourcePath":"docs/user/tak.html","navOrder":10,"keywords":["tak", "integration", "overview", "setup", "prerequisites", "configuration", "atak", "plugin", "local", "server", "roles", "cot", "cursor", "target", "format", "identity", "wire", "usage", "with", "troubleshooting", "security", "considerations", "related", "topics"],"aliases":["tak", "atak", "team-awareness-kit"],"charCount":6729},
{"id":"telemetry-and-sensors","title":"Telemetry & Sensors","section":"user","locale":"en","resourcePath":"docs/user/telemetry-and-sensors.html","navOrder":9,"keywords":["telemetry", "sensors", "overview", "device", "environment", "temperature", "humidity", "air", "quality", "light", "power", "metrics", "configuring", "recommended", "intervals", "viewing", "troubleshooting", "related", "topics"],"aliases":["sensors", "environment", "weather", "power-metrics"],"charCount":4912},
{"id":"translate","title":"Translate the App","section":"user","locale":"en","resourcePath":"docs/user/translate.html","navOrder":17,"keywords":["translate", "the", "app", "what", "gets", "translated", "how", "contribute", "adding", "new", "language", "translations", "are", "organized", "translation", "guidelines", "questions"],"aliases":["translate", "crowdin", "localization"],"charCount":4057},
{"id":"units-and-locale","title":"Units, Measurement & Locale","section":"user","locale":"en","resourcePath":"docs/user/units-and-locale.html","navOrder":16,"keywords":["units", "measurement", "locale", "how", "works", "the", "radio", "own", "screen", "separate", "temperature", "distance", "altitude", "where", "these", "appear", "speed", "wind", "rainfall", "that", "never", "change", "date", "time", "changing", "your", "system", "overriding", "app", "related"],"aliases":[],"charCount":8006},
{"id":"units-and-locale","title":"Units, Measurement & Locale","section":"user","locale":"en","resourcePath":"docs/user/units-and-locale.html","navOrder":16,"keywords":["units", "measurement", "locale", "how", "works", "the", "radio", "own", "screen", "separate", "temperature", "distance", "altitude", "where", "these", "appear", "speed", "wind", "rainfall", "that", "never", "change", "date", "time", "changing", "your", "system", "overriding", "app", "related"],"aliases":[],"charCount":8089},
{"id":"widget","title":"Home Screen Widget","section":"user","locale":"en","resourcePath":"docs/user/widget.html","navOrder":20,"keywords":["home", "screen", "widget", "what", "shows", "adding", "the", "related", "topics"],"aliases":["widget", "home-screen-widget", "local-stats-widget"],"charCount":1856},
{"id":"adding-a-feature-module","title":"Adding a Feature Module","section":"developer","locale":"en","resourcePath":"docs/developer/adding-a-feature-module.html","navOrder":3,"keywords":["adding", "feature", "module", "create", "the", "directory", "build", "gradle", "kts", "register", "settings", "app", "desktop", "add", "navigation", "routes", "entries", "source", "set", "guidelines", "testing", "expectations", "checklist"],"aliases":["new-module", "feature-module", "module-guide"],"charCount":3743},
{"id":"architecture","title":"Architecture","section":"developer","locale":"en","resourcePath":"docs/developer/architecture.html","navOrder":1,"keywords":["architecture", "layer", "overview", "module", "categories", "androidapp", "android", "application", "desktopapp", "desktop", "jvm", "feature", "modules", "core", "kmp", "source", "sets", "dependency", "injection", "radio", "control", "service", "repository", "navigation"],"aliases":["layers", "module-architecture", "kmp", "radio-control"],"charCount":7274},
{"id":"codebase","title":"Codebase","section":"developer","locale":"en","resourcePath":"docs/developer/codebase.html","navOrder":2,"keywords":["codebase", "repository", "structure", "namespacing", "convention", "build", "system", "gradle", "kotlin", "dsl", "plugins", "variants", "android", "key", "tasks", "compile", "check", "across", "all", "kmp", "targets", "run", "tests", "code", "quality", "desktop", "native", "installers", "for", "the"],"aliases":["repository-layout", "project-structure", "source-code"],"charCount":3982},
{"id":"contributing","title":"Contributing","section":"developer","locale":"en","resourcePath":"docs/developer/contributing.html","navOrder":8,"keywords":["contributing", "branch", "naming", "development", "workflow", "commit", "messages", "pull", "request", "checklist", "code", "style", "architecture", "rules", "verification", "getting", "help"],"aliases":["contributing", "pull-request", "branch-naming"],"charCount":3262},
{"id":"measurement","title":"Measurement & Formatting","section":"developer","locale":"en","resourcePath":"docs/developer/measurement.html","navOrder":9,"keywords":["measurement", "formatting", "overview", "metricformatter", "api", "usage", "numberformatter", "unit", "conversion", "adding", "new", "type", "dateformatter", "design", "decisions", "related"],"aliases":["measurement", "metric-formatter", "number-formatter"],"charCount":7637},
{"id":"measurement","title":"Measurement & Formatting","section":"developer","locale":"en","resourcePath":"docs/developer/measurement.html","navOrder":9,"keywords":["measurement", "formatting", "overview", "metricformatter", "api", "usage", "numberformatter", "unit", "conversion", "adding", "new", "type", "dateformatter", "design", "decisions", "related"],"aliases":["measurement", "metric-formatter", "number-formatter"],"charCount":7656},
{"id":"navigation-and-deep-links","title":"Navigation & Deep Links","section":"developer","locale":"en","resourcePath":"docs/developer/navigation-and-deep-links.html","navOrder":4,"keywords":["navigation", "deep", "links", "route", "architecture", "hierarchy", "conventions", "link", "router", "uri", "format", "supported", "backstack", "synthesis", "adding", "entry", "registration", "testing"],"aliases":["deeplinks", "navigation-3", "routes"],"charCount":6867},
{"id":"persistence","title":"Persistence","section":"developer","locale":"en","resourcePath":"docs/developer/persistence.html","navOrder":6,"keywords":["persistence", "room", "kmp", "database", "key", "points", "what", "stored", "datastore", "preferences", "core", "prefs", "docs", "intentionally", "skip", "best", "practices"],"aliases":["room", "database", "datastore", "prefs"],"charCount":3274},
{"id":"test-builds","title":"Test Builds & Obtainium","section":"developer","locale":"en","resourcePath":"docs/developer/test-builds.html","navOrder":10,"keywords":["test", "builds", "obtainium", "which", "channels", "can", "reach", "one", "tap", "setup", "how", "many", "entries", "you", "have", "once", "manual", "stable", "open", "beta", "closed", "bleeding", "edge", "newest", "promoted", "build", "any", "channel", "snapshot", "latest"],"aliases":["test-builds", "obtainium", "beta", "snapshot"],"charCount":20567},