mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-04-20 22:13:48 +00:00
fix: normalize stored frequency
This commit is contained in:
parent
ec14870aed
commit
78f1a7b28e
1 changed files with 3 additions and 5 deletions
|
|
@ -993,11 +993,9 @@ class _LineOfSightMapScreenState extends State<LineOfSightMapScreen> {
|
|||
);
|
||||
}
|
||||
|
||||
double? _normalizeFrequencyMHz(int? frequencyHz) {
|
||||
if (frequencyHz == null || frequencyHz <= 0) return null;
|
||||
if (frequencyHz >= 1000000) return frequencyHz / 1e6;
|
||||
if (frequencyHz >= 1000) return frequencyHz / 1e3;
|
||||
return frequencyHz.toDouble();
|
||||
double? _normalizeFrequencyMHz(int? frequencyKHz) {
|
||||
if (frequencyKHz == null || frequencyKHz <= 0) return null;
|
||||
return frequencyKHz / 1000.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue