Skip to content

Commit

Permalink
Merge pull request #236 from Hunter275/issue-235-position-distance
Browse files Browse the repository at this point in the history
Correctly set position_precision
  • Loading branch information
thebentern authored Jun 16, 2024
2 parents 9466624 + ae0e416 commit ce60de9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/PageComponents/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
psk: fromByteArray(channel?.settings?.psk ?? new Uint8Array(0)),
positionEnabled: channel?.settings?.moduleSettings?.positionPrecision != undefined && channel?.settings?.moduleSettings?.positionPrecision > 0,
preciseLocation: channel?.settings?.moduleSettings?.positionPrecision == 32,
positionPrecision: channel?.settings?.moduleSettings?.positionPrecision == undefined ? config.display?.units == 0 ? 23000 : 24140 : channel?.settings?.moduleSettings?.positionPrecision
positionPrecision: channel?.settings?.moduleSettings?.positionPrecision == undefined ? 10 : channel?.settings?.moduleSettings?.positionPrecision
},
},
}}
Expand Down Expand Up @@ -112,8 +112,8 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
"If not sharing precise location, position shared on channel will be accurate within this distance",
properties: {
enumValue: config.display?.units == 0 ?
{ "Within 23 km":23000, "Within 12 km":12000, "Within 5.8 km":5800, "Within 2.9 km":2900, "Within 1.5 km":1500, "Within 700 m":700, "Within 350 m":350, "Within 200 m":200, "Within 90 m":90, "Within 50 m":50 } :
{ "Within 15 miles":24140, "Within 7.3 miles":11748, "Within 3.6 miles":5793, "Within 1.8 miles":2896, "Within 0.9 miles":1448, "Within 0.5 miles":804, "Within 0.2 miles":321, "Within 600 feet":182, "Within 300 feet":91, "Within 150 feet":45 }
{ "Within 23 km":10, "Within 12 km":11, "Within 5.8 km":12, "Within 2.9 km":13, "Within 1.5 km":14, "Within 700 m":15, "Within 350 m":16, "Within 200 m":17, "Within 90 m":18, "Within 50 m":19 } :
{ "Within 15 miles":10, "Within 7.3 miles":11, "Within 3.6 miles":12, "Within 1.8 miles":13, "Within 0.9 miles":14, "Within 0.5 miles":15, "Within 0.2 miles":16, "Within 600 feet":17, "Within 300 feet":18, "Within 150 feet":19 }
},
},
],
Expand Down

0 comments on commit ce60de9

Please sign in to comment.