((draft) => {
+
+ device.nodes.delete(nodeNum);
+ })
+ )
+ },
setMessageState: (
type: "direct" | "broadcast",
channelIndex: Types.ChannelNumber,
diff --git a/src/pages/Map.tsx b/src/pages/Map.tsx
index 6916df58..eaff3f6e 100644
--- a/src/pages/Map.tsx
+++ b/src/pages/Map.tsx
@@ -20,7 +20,7 @@ import MapGl from "react-map-gl/maplibre";
export const MapPage = (): JSX.Element => {
const { nodes, waypoints } = useDevice();
- const { rasterSources } = useAppStore();
+ const { rasterSources, darkMode } = useAppStore();
const { default: map } = useMap();
const [zoom, setZoom] = useState(0);
@@ -128,6 +128,7 @@ export const MapPage = (): JSX.Element => {
attributionControl={false}
renderWorldCopies={false}
maxPitch={0}
+ style = {{filter: darkMode ? 'brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7)' : ''}}
dragRotate={false}
touchZoomRotate={false}
initialViewState={{
@@ -160,6 +161,7 @@ export const MapPage = (): JSX.Element => {
key={node.num}
longitude={node.position.longitudeI / 1e7}
latitude={node.position.latitudeI / 1e7}
+ style = {{filter: darkMode ? 'invert(1)' : ''}}
anchor="bottom"
>
void;
+}
export const NodesPage = (): JSX.Element => {
- const { nodes, hardware } = useDevice();
+ const { nodes, hardware, setDialogOpen } = useDevice();
+ const { setNodeNumToBeRemoved } = useAppStore();
const filteredNodes = Array.from(nodes.values()).filter(
(n) => n.num !== hardware.myNodeNum,
@@ -27,6 +37,7 @@ export const NodesPage = (): JSX.Element => {
{ title: "Last Heard", type: "normal", sortable: true },
{ title: "SNR", type: "normal", sortable: true },
{ title: "Connection", type: "normal", sortable: true },
+ { title: "Remove", type: "normal", sortable: false },
]}
rows={filteredNodes.map((node) => [
,
@@ -57,12 +68,16 @@ export const NodesPage = (): JSX.Element => {
{(node.snr + 10) * 5}raw
,
- {node.lastHeard != 0 ?
- (node.viaMqtt === false && node.hopsAway === 0
- ? "Direct": node.hopsAway.toString() + " hops away")
- : "-"}
- {node.viaMqtt === true? ", via MQTT": ""}
-
+ {node.lastHeard != 0 ?
+ (node.viaMqtt === false && node.hopsAway === 0
+ ? "Direct": node.hopsAway.toString() + " hops away")
+ : "-"}
+ {node.viaMqtt === true? ", via MQTT": ""}
+ ,
+
])}
/>
diff --git a/src/validation/channel.ts b/src/validation/channel.ts
index 336e35e1..33349d06 100644
--- a/src/validation/channel.ts
+++ b/src/validation/channel.ts
@@ -41,4 +41,13 @@ export class Channel_SettingsValidation
@IsBoolean()
downlinkEnabled: boolean;
+
+ @IsBoolean()
+ positionEnabled: boolean;
+
+ @IsBoolean()
+ preciseLocation: boolean;
+
+ @IsInt()
+ positionPrecision: number;
}
diff --git a/src/validation/config/position.ts b/src/validation/config/position.ts
index 752a7093..2f035744 100644
--- a/src/validation/config/position.ts
+++ b/src/validation/config/position.ts
@@ -2,8 +2,10 @@ import type { Message } from "@bufbuild/protobuf";
import { Protobuf } from "@meshtastic/js";
import { IsArray, IsBoolean, IsEnum, IsInt } from "class-validator";
+const DeprecatedPositionValidationFields = ['gpsEnabled', 'gpsAttemptTime'];
+
export class PositionValidation
- implements Omit
+ implements Omit
{
@IsInt()
positionBroadcastSecs: number;
diff --git a/src/validation/config/power.ts b/src/validation/config/power.ts
index f1cc1691..3f3d097a 100644
--- a/src/validation/config/power.ts
+++ b/src/validation/config/power.ts
@@ -1,6 +1,6 @@
import type { Message } from "@bufbuild/protobuf";
import type { Protobuf } from "@meshtastic/js";
-import { IsBoolean, IsInt, Max, Min } from "class-validator";
+import { IsBoolean, IsInt, IsNumber, Max, Min } from "class-validator";
export class PowerValidation
implements Omit
@@ -11,7 +11,7 @@ export class PowerValidation
@IsInt()
onBatteryShutdownAfterSecs: number;
- @IsInt()
+ @IsNumber()
@Min(2)
@Max(4)
adcMultiplierOverride: number;