mirror of
https://github.com/meshtastic/web.git
synced 2026-04-25 00:08:19 -04:00
Use rome and initial format
This commit is contained in:
@@ -11,9 +11,9 @@ export const Audio = (): JSX.Element => {
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "audio",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
value: data,
|
||||
},
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -30,13 +30,13 @@ export const Audio = (): JSX.Element => {
|
||||
type: "toggle",
|
||||
name: "codec2Enabled",
|
||||
label: "Codec 2 Enabled",
|
||||
description: "Enable Codec 2 audio encoding"
|
||||
description: "Enable Codec 2 audio encoding",
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
name: "pttPin",
|
||||
label: "PTT Pin",
|
||||
description: "GPIO pin to use for PTT"
|
||||
description: "GPIO pin to use for PTT",
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
@@ -44,35 +44,35 @@ export const Audio = (): JSX.Element => {
|
||||
label: "Bitrate",
|
||||
description: "Bitrate to use for audio encoding",
|
||||
properties: {
|
||||
enumValue: Protobuf.ModuleConfig_AudioConfig_Audio_Baud
|
||||
}
|
||||
enumValue: Protobuf.ModuleConfig_AudioConfig_Audio_Baud,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
name: "i2sWs",
|
||||
label: "i2S WS",
|
||||
description: "GPIO pin to use for i2S WS"
|
||||
description: "GPIO pin to use for i2S WS",
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
name: "i2sSd",
|
||||
label: "i2S SD",
|
||||
description: "GPIO pin to use for i2S SD"
|
||||
description: "GPIO pin to use for i2S SD",
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
name: "i2sDin",
|
||||
label: "i2S DIN",
|
||||
description: "GPIO pin to use for i2S DIN"
|
||||
description: "GPIO pin to use for i2S DIN",
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
name: "i2sSck",
|
||||
label: "i2S SCK",
|
||||
description: "GPIO pin to use for i2S SCK"
|
||||
}
|
||||
]
|
||||
}
|
||||
description: "GPIO pin to use for i2S SCK",
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -11,9 +11,9 @@ export const CannedMessage = (): JSX.Element => {
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "cannedMessage",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
value: data,
|
||||
},
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -30,25 +30,25 @@ export const CannedMessage = (): JSX.Element => {
|
||||
type: "toggle",
|
||||
name: "rotary1Enabled",
|
||||
label: "Rotary Encoder #1 Enabled",
|
||||
description: "Enable the rotary encoder"
|
||||
description: "Enable the rotary encoder",
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
name: "inputbrokerPinA",
|
||||
label: "Encoder Pin A",
|
||||
description: "GPIO Pin Value (1-39) For encoder port A"
|
||||
description: "GPIO Pin Value (1-39) For encoder port A",
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
name: "inputbrokerPinB",
|
||||
label: "Encoder Pin B",
|
||||
description: "GPIO Pin Value (1-39) For encoder port B"
|
||||
description: "GPIO Pin Value (1-39) For encoder port B",
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
name: "inputbrokerPinPress",
|
||||
label: "Encoder Pin Press",
|
||||
description: "GPIO Pin Value (1-39) For encoder Press"
|
||||
description: "GPIO Pin Value (1-39) For encoder Press",
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
@@ -57,8 +57,8 @@ export const CannedMessage = (): JSX.Element => {
|
||||
description: "Select input event.",
|
||||
properties: {
|
||||
enumValue:
|
||||
Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar
|
||||
}
|
||||
Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
@@ -67,8 +67,8 @@ export const CannedMessage = (): JSX.Element => {
|
||||
description: "Select input event.",
|
||||
properties: {
|
||||
enumValue:
|
||||
Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar
|
||||
}
|
||||
Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
@@ -77,30 +77,30 @@ export const CannedMessage = (): JSX.Element => {
|
||||
description: "Select input event",
|
||||
properties: {
|
||||
enumValue:
|
||||
Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar
|
||||
}
|
||||
Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
name: "updown1Enabled",
|
||||
label: "Up Down enabled",
|
||||
description: "Enable the up / down encoder"
|
||||
description: "Enable the up / down encoder",
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
name: "allowInputSource",
|
||||
label: "Allow Input Source",
|
||||
description:
|
||||
"Select from: '_any', 'rotEnc1', 'upDownEnc1', 'cardkb'"
|
||||
"Select from: '_any', 'rotEnc1', 'upDownEnc1', 'cardkb'",
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
name: "sendBell",
|
||||
label: "Send Bell",
|
||||
description: "Sends a bell character with each message"
|
||||
}
|
||||
]
|
||||
}
|
||||
description: "Sends a bell character with each message",
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -11,9 +11,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "externalNotification",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
value: data,
|
||||
},
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
type: "toggle",
|
||||
name: "enabled",
|
||||
label: "Module Enabled",
|
||||
description: "Enable External Notification"
|
||||
description: "Enable External Notification",
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -40,12 +40,12 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
properties: {
|
||||
suffix: "ms"
|
||||
}
|
||||
suffix: "ms",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -54,9 +54,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
description: "Output",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -65,9 +65,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
description: "Output Vibrate",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -76,9 +76,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
description: "Output Buzzer",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -87,9 +87,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
description: "Active",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -98,9 +98,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
description: "Alert Message",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -109,9 +109,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
description: "Alert Message Vibrate",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -120,9 +120,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
description: "Alert Message Buzzer",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -132,9 +132,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
"Should an alert be triggered when receiving an incoming bell?",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -143,9 +143,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
description: "Alert Bell Vibrate",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -154,9 +154,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
description: "Alert Bell Buzzer",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -165,9 +165,9 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
description: "Use PWM",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -176,12 +176,12 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
description: "Nag Timeout",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { MQTTValidation } from "@app/validation/moduleConfig/mqtt.js";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
import { DynamicForm } from "@components/Form/DynamicForm.js";
|
||||
import { useDevice } from "@app/core/stores/deviceStore.js";
|
||||
import type { MQTTValidation } from "@app/validation/moduleConfig/mqtt.js";
|
||||
import { DynamicForm } from "@components/Form/DynamicForm.js";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export const MQTT = (): JSX.Element => {
|
||||
const { moduleConfig, setWorkingModuleConfig } = useDevice();
|
||||
@@ -11,9 +11,9 @@ export const MQTT = (): JSX.Element => {
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "mqtt",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
value: data,
|
||||
},
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ export const MQTT = (): JSX.Element => {
|
||||
type: "toggle",
|
||||
name: "enabled",
|
||||
label: "Enabled",
|
||||
description: "Enable or disable MQTT"
|
||||
description: "Enable or disable MQTT",
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
@@ -40,9 +40,9 @@ export const MQTT = (): JSX.Element => {
|
||||
"MQTT server address to use for default/custom servers",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
@@ -51,9 +51,9 @@ export const MQTT = (): JSX.Element => {
|
||||
description: "MQTT username to use for default/custom servers",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "password",
|
||||
@@ -62,9 +62,9 @@ export const MQTT = (): JSX.Element => {
|
||||
description: "MQTT password to use for default/custom servers",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -73,9 +73,9 @@ export const MQTT = (): JSX.Element => {
|
||||
description: "Enable or disable MQTT encryption",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -84,12 +84,46 @@ export const MQTT = (): JSX.Element => {
|
||||
description: "Whether to send/consume JSON packets on MQTT",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
name: "tlsEnabled",
|
||||
label: "TLS Enabled",
|
||||
description: "Enable or disable TLS",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
name: "root",
|
||||
label: "Root topic",
|
||||
description: "MQTT root topic to use for default/custom servers",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
name: "proxyToClientEnabled",
|
||||
label: "Proxy to Client Enabled",
|
||||
description:
|
||||
"Whether to proxy MQTT packets to the client (for example to Home Assistant)",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -11,9 +11,9 @@ export const RangeTest = (): JSX.Element => {
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "rangeTest",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
value: data,
|
||||
},
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ export const RangeTest = (): JSX.Element => {
|
||||
type: "toggle",
|
||||
name: "enabled",
|
||||
label: "Module Enabled",
|
||||
description: "Enable Range Test"
|
||||
description: "Enable Range Test",
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -39,9 +39,9 @@ export const RangeTest = (): JSX.Element => {
|
||||
description: "How long to wait between sending test packets",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -50,12 +50,12 @@ export const RangeTest = (): JSX.Element => {
|
||||
description: "ESP32 Only",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { SerialValidation } from "@app/validation/moduleConfig/serial.js";
|
||||
import { DynamicForm } from "@components/Form/DynamicForm.js";
|
||||
import { useDevice } from "@core/stores/deviceStore.js";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
import { DynamicForm } from "@components/Form/DynamicForm.js";
|
||||
|
||||
export const Serial = (): JSX.Element => {
|
||||
const { moduleConfig, setWorkingModuleConfig } = useDevice();
|
||||
@@ -11,9 +11,9 @@ export const Serial = (): JSX.Element => {
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "serial",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
value: data,
|
||||
},
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ export const Serial = (): JSX.Element => {
|
||||
type: "toggle",
|
||||
name: "enabled",
|
||||
label: "Module Enabled",
|
||||
description: "Enable Serial output"
|
||||
description: "Enable Serial output",
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -40,9 +40,9 @@ export const Serial = (): JSX.Element => {
|
||||
"Any packets you send will be echoed back to your device",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -51,9 +51,9 @@ export const Serial = (): JSX.Element => {
|
||||
description: "Set the GPIO pin to the RXD pin you have set up.",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -62,9 +62,9 @@ export const Serial = (): JSX.Element => {
|
||||
description: "Set the GPIO pin to the TXD pin you have set up.",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
@@ -74,12 +74,12 @@ export const Serial = (): JSX.Element => {
|
||||
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
properties: {
|
||||
enumValue: Protobuf.ModuleConfig_SerialConfig_Serial_Baud
|
||||
}
|
||||
enumValue: Protobuf.ModuleConfig_SerialConfig_Serial_Baud,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -90,12 +90,12 @@ export const Serial = (): JSX.Element => {
|
||||
"Seconds to wait before we consider your packet as 'done'",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
properties: {
|
||||
suffix: "Seconds"
|
||||
}
|
||||
suffix: "Seconds",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
@@ -105,16 +105,23 @@ export const Serial = (): JSX.Element => {
|
||||
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
properties: {
|
||||
enumValue: Protobuf.ModuleConfig_SerialConfig_Serial_Mode,
|
||||
formatEnumName: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
formatEnumName: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
name: "overrideConsoleSerialPort",
|
||||
label: "Override Console Serial Port",
|
||||
description:
|
||||
"If you have a serial port connected to the console, this will override it.",
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -11,9 +11,9 @@ export const StoreForward = (): JSX.Element => {
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "storeForward",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
value: data,
|
||||
},
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ export const StoreForward = (): JSX.Element => {
|
||||
type: "toggle",
|
||||
name: "enabled",
|
||||
label: "Module Enabled",
|
||||
description: "Enable Store & Forward"
|
||||
description: "Enable Store & Forward",
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
@@ -39,9 +39,9 @@ export const StoreForward = (): JSX.Element => {
|
||||
description: "Enable Store & Forward heartbeat",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -51,12 +51,12 @@ export const StoreForward = (): JSX.Element => {
|
||||
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
properties: {
|
||||
suffix: "Records"
|
||||
}
|
||||
suffix: "Records",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -65,9 +65,9 @@ export const StoreForward = (): JSX.Element => {
|
||||
description: "Max number of records to return",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -76,12 +76,12 @@ export const StoreForward = (): JSX.Element => {
|
||||
description: "Max number of records to return",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { TelemetryValidation } from "@app/validation/moduleConfig/telemetry.js";
|
||||
import { DynamicForm } from "@components/Form/DynamicForm.js";
|
||||
import { useDevice } from "@core/stores/deviceStore.js";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
import { DynamicForm } from "@components/Form/DynamicForm.js";
|
||||
|
||||
export const Telemetry = (): JSX.Element => {
|
||||
const { moduleConfig, setWorkingModuleConfig } = useDevice();
|
||||
@@ -11,9 +11,9 @@ export const Telemetry = (): JSX.Element => {
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "telemetry",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
value: data,
|
||||
},
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -32,8 +32,8 @@ export const Telemetry = (): JSX.Element => {
|
||||
label: "Query Interval",
|
||||
description: "Interval to get telemetry data",
|
||||
properties: {
|
||||
suffix: "seconds"
|
||||
}
|
||||
suffix: "seconds",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
@@ -41,29 +41,41 @@ export const Telemetry = (): JSX.Element => {
|
||||
label: "Update Interval",
|
||||
description: "How often to send Metrics over the mesh",
|
||||
properties: {
|
||||
suffix: "seconds"
|
||||
}
|
||||
suffix: "seconds",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
name: "environmentMeasurementEnabled",
|
||||
label: "Module Enabled",
|
||||
description: "Enable the Environment Telemetry"
|
||||
description: "Enable the Environment Telemetry",
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
name: "environmentScreenEnabled",
|
||||
label: "Displayed on Screen",
|
||||
description: "Show the Telemetry Module on the OLED"
|
||||
description: "Show the Telemetry Module on the OLED",
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
name: "environmentDisplayFahrenheit",
|
||||
label: "Display Fahrenheit",
|
||||
description: "Display temp in Fahrenheit"
|
||||
}
|
||||
]
|
||||
}
|
||||
description: "Display temp in Fahrenheit",
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
name: "airQualityEnabled",
|
||||
label: "Air Quality Enabled",
|
||||
description: "Enable the Air Quality Telemetry",
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
name: "airQualityInterval",
|
||||
label: "Air Quality Update Interval",
|
||||
description: "How often to send Air Quality data over the mesh",
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user