Files
Meshtastic-Android/core/resources
James Rich 0a03b1e2e4 feat: wire TINY_FAST/TINY_SLOW presets + force protobufs snapshot for preview
Fully integrate the two new amateur-radio modem presets from the
develop-SNAPSHOT protos (firmware PR #10597):

- ChannelOption: add TINY_FAST/TINY_SLOW with the firmware-accurate
  15.625 kHz bandwidth (0.015625f). The proto comment's "20kHz" is the
  padded channel spacing, not the modem bandwidth that feeds
  numChannels/radioFreq, so using it would skew the frequency math.
- ModelExtensions.labelRes + label_tiny_fast/label_tiny_slow strings
  for the preset dropdown.
- Channel.kt: document that the preset->name `when` is interop-critical
  (the name feeds the channel hash, channel number/frequency and MQTT
  topic), name the firmware source of truth
  (DisplayFormatters::getModemPresetDisplayName), and flag the two
  deliberately-abbreviated names so nobody "fixes" the intentional
  compile tripwire with an auto-deriving else.

Also force org.meshtastic:protobufs* to develop-SNAPSHOT across the
build (root build.gradle.kts). takpacket-sdk-jvm:0.5.3 transitively
pins protobufs:2.7.25, and Gradle ranks 2.7.25 > develop-SNAPSHOT, so
the test runtime classpath was downgrading to 2.7.25 while compilation
used the snapshot -> NoSuchFieldError/NoSuchMethodError on the proto
classes (assembleDebug/detekt miss it; test/allTests catch it). The
force is safe because atak.proto is unchanged, so takpacket's message
ABI stays compatible with the newer protobufs.

NOTE: both the snapshot pin and this force are preview-only. Revert to
a released protobufs and drop the force once takpacket-sdk (and mqtt)
are republished against the new protos.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 11:50:25 -05:00
..

:core:resources

Overview

The :core:resources module is the centralized source for all UI strings and localizable resources. It uses the Compose Multiplatform Resource library to provide a type-safe way to access strings.

Key Features

  • Single Source of Truth: All UI strings must be defined in this module, not in the app module or feature modules.
  • Type-Safety: Generates a Res object that allows accessing strings like Res.string.your_key with compile-time checking.

Usage

The library provides a standard way to access strings in Jetpack Compose.

import org.jetbrains.compose.resources.stringResource
import org.meshtastic.core.resources.Res
import org.meshtastic.core.resources.your_string_key

Text(text = stringResource(Res.string.your_string_key))

Dependency Graph

graph TB
  :core:resources[resources]:::kmp-library-compose
  :core:resources -.-> :core:common

classDef android-application fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef android-application-compose fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef compose-desktop-application fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef android-feature fill:#FFD6A5,stroke:#000,stroke-width:2px,color:#000;
classDef android-library fill:#9BF6FF,stroke:#000,stroke-width:2px,color:#000;
classDef android-library-compose fill:#9BF6FF,stroke:#000,stroke-width:2px,color:#000;
classDef android-test fill:#A0C4FF,stroke:#000,stroke-width:2px,color:#000;
classDef jvm-library fill:#BDB2FF,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-feature fill:#FFD6A5,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-library-compose fill:#FFC1CC,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-library fill:#FFC1CC,stroke:#000,stroke-width:2px,color:#000;
classDef unknown fill:#FFADAD,stroke:#000,stroke-width:2px,color:#000;