mirror of
https://github.com/meshtastic/meshtastic.git
synced 2025-02-21 03:25:51 -08:00
Merge branch 'master' into jsonChannel
This commit is contained in:
commit
c6e2408988
|
@ -4,6 +4,7 @@ sidebar_label: Contributing
|
|||
slug: /contributing
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
### Volunteer Based Development
|
||||
|
||||
Meshtastic is a team of volunteers, and as such there are always plenty of ways to help. This project gets great contributions from people in their off hours. Those contributors work on the features they are interested in. It is a very open and welcoming developer community, and we are always looking for help to improve Meshtastic.
|
||||
|
|
|
@ -11,24 +11,19 @@ The device config options are: Role, Serial Output, and Debug Log. Device config
|
|||
|
||||
## Device Config Values
|
||||
|
||||
### Role
|
||||
|
||||
Sets the role of the node.
|
||||
|
||||
Acceptable values:
|
||||
|
||||
| Value | Description |
|
||||
|:----------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
| `CLIENT` | Client (default) - This role will follow the standard routing rules while also allowing the device to interact with client applications via BLE/Wi-Fi (Android/Apple/Web). |
|
||||
| `CLIENT_MUTE` | Client Mute - Same as a client except packets will not hop over this node, does not contribute to routing packets for mesh. |
|
||||
| `ROUTER` | Router - Mesh packets will prefer to be routed over this node. The assumption is that Router-type devices will be placed in locations with a height/range/antenna advantage, and therefore have better overall coverage. This node will not be used by client apps. The BLE/Wi-Fi radios and the OLED screen will be put to sleep. Please note: Due to the preferred routing, this role may cause higher power usage due to more frequent transmission. |
|
||||
| `ROUTER_CLIENT` | Router Client - Hybrid of the Client and Router roles. Similar to Router, except the Router Client can be used as both a Router and an app connected Client. BLE/Wi-Fi and OLED screen will not be put to sleep. |
|
||||
| `REPEATER` | Repeater - Mesh packets will prefer to be routed over this node. This role eliminates unnecessary overhead such as NodeInfo, DeviceTelemetry, and any other mesh packet, resulting in the device not appearing as part of the network. As such, direct messaging this node is not available, as it will not appear in your nodes list which results in a cleaner mesh network. Channel and modem settings of the mesh packets being repeated must be identical to the repeater's configuration. Please see Rebroadcast Mode for additional settings specific to this role. |
|
||||
| `TRACKER` | Tracker - For use with devices intended as a GPS tracker. Position packets sent from this device will be higher priority. Smart Position Broadcast will default to the currently configured settings. When used in conjunction with power.is_power_saving = true, nodes will wake up, send position, and then sleep for position.position_broadcast_secs seconds. |
|
||||
| `SENSOR` | Sensor - For use with devices intended to primarily collect sensor readings. Telemetry packets sent from this device will be higher priority, broadcasting every five minutes. When used in conjunction with power.is_power_saving = true, nodes will wake up, send environment telemetry, and then sleep for telemetry.environment_update_interval seconds. |
|
||||
| `TAK` | TAK - Used for nodes dedicated for connection to an ATAK EUD. Turns off many of the routine broadcasts to favor CoT packet stream from the Meshtastic ATAK plugin -> IMeshService -> Node. |
|
||||
| `CLIENT_HIDDEN` | Client Hidden - Used for nodes that "only speak when spoken to." Turns off all of the routine broadcasts but allows for ad-hoc communication. Still rebroadcasts, but with local only rebroadcast mode (known meshes only). Can be used for clandestine operation or to dramatically reduce airtime / power consumption |
|
||||
| `LOST_AND_FOUND` | Lost and Found - Used to automatically send a text message with current position at frequent intervals to the primary channel for the device: "I'm lost! Position: lat / long" |
|
||||
### Roles
|
||||
| Device Role | Description | Best Uses |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| CLIENT | App connected or stand alone messaging device. | General use for individuals needing to communicate over the Meshtastic network with support for client applications. |
|
||||
| CLIENT_MUTE | Device that does not forward packets from other devices. | Situations where a device needs to participate in the network without assisting in packet routing, reducing network load. |
|
||||
| CLIENT_HIDDEN | Device that only broadcasts as needed for stealth or power savings. | Use in stealth/hidden deployments or to reduce airtime/power consumption while still participating in the network. |
|
||||
| TRACKER | Broadcasts GPS position packets as priority. | Tracking the location of individuals or assets, especially in scenarios where timely and efficient location updates are critical. |
|
||||
| LOST_AND_FOUND | Broadcasts location as message to default channel regularly for to assist with device recovery. | Used for recovery efforts of a lost device. |
|
||||
| SENSOR | Prioritizes broadcasting GPS position packets. | Deploying in scenarios where gathering environmental or other sensor data is crucial, with efficient power usage and frequent updates. |
|
||||
| TAK | Optimized for ATAK system communication, reduces routine broadcasts. | Integration with ATAK systems for communication in tactical or coordinated operations. |
|
||||
| REPEATER | Infrastructure node for extending network coverage by relaying messages with minimal overhead. Not visible in Nodes list. | Best positioned in strategic locations to maximize the network's overall coverage. Device is not shown in topology. |
|
||||
| ROUTER | Infrastructure node for extending network coverage by relaying messages. Visible in Nodes list. | Best positioned in strategic locations to maximize the network's overall coverage. Device is shown in topology. |
|
||||
| ROUTER_CLIENT | Combination of both ROUTER and CLIENT. Not for mobile devices. | Devices in a strategic position for priority routing that need to also serve as a standard CLIENT. |
|
||||
|
||||
#### Role Comparison
|
||||
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
id: update-techo-bootloader
|
||||
title: How to Update the LilyGo T-Echo Bootloader to the Latest Version
|
||||
sidebar_label: Update T-Echo Bootloader
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
If you're experiencing issues with updating or flashing newer versions of the Meshtastic firmware, and your LilyGo T-Echo is not running the latest bootloader version (0.6.1), updating the bootloader may resolve these problems.
|
||||
|
||||
To check which version of the bootloader your device is running, place the device into DFU mode by double-pressing the reset button. Then, open the mounted drive that appears on your computer and check the INFO_UF2.TXT file.
|
||||
|
||||
## Updating bootloader
|
||||
|
||||
Below are the steps to update your bootloader.
|
||||
|
||||
### Method 1: Using the UF2 File (Recommended)
|
||||
|
||||
1. Download the Latest UF2 Bootloader File for the T-Echo from [Github](https://github.com/meshtastic/firmware/blob/master/bin/update-lilygo_techo_bootloader-0.6.1_nosd.uf2).
|
||||
2. Connect your LilyGo T-Echo to your computer via USB.
|
||||
3. Activate bootloader mode by quickly double pressing the RESET button on your T-Echo. The device should appear as a removable drive on your computer.
|
||||
4. Drag and drop the .uf2 file you downloaded into the T-Echo's drive. The device will automatically update the bootloader and reset.
|
||||
5. Once the device resets, the update is complete. Your T-Echo is now running the latest bootloader version and you can proceed with [flashing the firmware](/docs/getting-started/flashing-firmware/nrf52/drag-n-drop/).
|
||||
|
||||
### Method 2: Using adafruit-nrfutil
|
||||
|
||||
Should flashing the UF2 file to update your bootloader fail, you can use adafruit-nrfutil.
|
||||
|
||||
:::info
|
||||
|
||||
These instructions assume you have python and pip already installed. If you do not, please install the latest verion of python (which includes pip) from [Python.org](https://www.python.org/downloads/).
|
||||
|
||||
:::
|
||||
|
||||
1. Open a terminal or command prompt and install adafruit-nrfutil by running:
|
||||
|
||||
```bash
|
||||
pip install adafruit-nrfutil
|
||||
```
|
||||
|
||||
2. Obtain the lilygo_techo_bootloader-0.6.1.zip package from [Github](https://github.com/meshtastic/firmware/blob/master/bin/lilygo_techo_bootloader-0.6.1.zip).
|
||||
3. Connect your LilyGo T-Echo to your computer via USB.
|
||||
4. In the terminal or command prompt, navigate to the directory where you downloaded the bootloader zip package and execute the following command, replacing /dev/ttyACM0 with the correct port for your device (Windows users might use COMx):
|
||||
|
||||
```bash
|
||||
adafruit-nrfutil --verbose dfu serial --package lilygo_techo_bootloader-0.6.1.zip -p /dev/ttyACM0 -b 115200 --singlebank --touch 1200
|
||||
```
|
||||
|
||||
5. Once the process finishes, the update is complete. Your T-Echo is now running the latest bootloader version and you can proceed with [flashing the firmware](/docs/getting-started/flashing-firmware/nrf52/drag-n-drop/).
|
|
@ -51,7 +51,7 @@ Modular hardware system with Base, Core and Peripheral modules including the low
|
|||
[RAK13002](./rak/peripherals?rakmodules=IO) IO<br/>
|
||||
RAK14001 RGB LED<br/>
|
||||
RAK12002 RTC<br/>
|
||||
[RAK1910](./rak/peripherals?rakmodules=Sensors&sensors=RAK1901) Temperature and Humidity Sensor<br/>
|
||||
[RAK1901](./rak/peripherals?rakmodules=Sensors&sensors=RAK1901) Temperature and Humidity Sensor<br/>
|
||||
[RAK1902](./rak/peripherals?rakmodules=Sensors&sensors=RAK1902) Barometric Pressure Sensor<br/>
|
||||
[RAK1906](./rak/peripherals?rakmodules=Sensors&sensors=RAK1906) Environment Sensor<br/>
|
||||
RAK12013 Radar Sensor<br/>
|
||||
|
|
|
@ -4,6 +4,7 @@ sidebar_label: Legal
|
|||
slug: /legal
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
## Disclaimers
|
||||
|
||||
**Project Status:** Meshtastic is now at a stage where it offers a _mostly_ stable and reliable functionality, thanks to the dedicated efforts of our development team. While the core aspects of the project are well-established, we are still rapidly evolving and actively adding new features. As we continue to innovate and expand, some features in our current builds are in development, reflecting our commitment to continuous improvement and growth. We appreciate your engagement as we advance further in this exciting journey.
|
||||
|
|
113
docs/terms/index.mdx
Normal file
113
docs/terms/index.mdx
Normal file
|
@ -0,0 +1,113 @@
|
|||
---
|
||||
id: glossary
|
||||
title: Glossary of Terms
|
||||
slug: /terms/
|
||||
---
|
||||
|
||||
App / Application / Client Application
|
||||
: An application that connects to a Meshtastic node, typically for the purpose of sending or receiving data through the mesh network.
|
||||
|
||||
Band
|
||||
: A range of frequencies used for LoRa, dependent on region. Meshtastic further divides these bands into channels. Sometimes identified by the lower and upper bounds of the range (e.g. 902-928MHz), sometimes identified by a center frequency within the range (e.g. 915MHz), and sometimes only by the region they apply to (e.g. US).
|
||||
|
||||
Broadcast
|
||||
: Sending a message or data from one device to all other devices within range in the Meshtastic network, rather than to a specific recipient.
|
||||
|
||||
Channel | [Configuration](/docs/configuration/radio/channels/) | [Frequency Calculator](/docs/overview/radio-settings/#channel-frequency-calculator)
|
||||
: At least two definitions in Meshtastic usage: 1) One of 8 configurable channels in the firmware, each supporting a separate name and encryption, with one set as primary and the rest secondary. 2) A specific frequency within a LoRa band that a device can be configured to use.
|
||||
|
||||
CLI | [Guide](/docs/software/python/cli/)
|
||||
: Command Line Interface, a text-based interface used for interacting with software or devices like Meshtastic.
|
||||
|
||||
Client
|
||||
: A device or application that connects to a Meshtastic node, typically for the purpose of sending or receiving data through the mesh network.
|
||||
|
||||
Device
|
||||
: A physical piece of hardware that utilizes the Meshtastic software and LoRa (Long Range) radio technology to create a decentralized, long-range mesh network.
|
||||
|
||||
DFU
|
||||
: Device Firmware Update, a state which a device is placed into for it to receive a firmware update
|
||||
|
||||
ESP32 | [Drivers](/docs/getting-started/serial-drivers/esp32/) | [Firmware](/docs/getting-started/flashing-firmware/esp32/)
|
||||
: A chipset of microcontroller made/designed by Espressif, used by a number of devices. Higher power usage than NRF52, but often cheaper and supports WiFi if desired.
|
||||
|
||||
Firmware | [Guide](https://meshtastic.org/docs/getting-started/flashing-firmware/)
|
||||
: The low-level software programmed onto a Meshtastic device, controlling its hardware functions and enabling it to communicate within the mesh network using LoRa technology. Firmware
|
||||
|
||||
Flash/Flashing | [Guide](https://meshtastic.org/docs/getting-started/flashing-firmware/)
|
||||
: The process of updating or installing firmware on a Meshtastic device. This is typically done using a computer to load new firmware versions or custom software to enhance or modify device functionality.
|
||||
|
||||
GPIO
|
||||
: General Purpose Input/Output. An uncommitted digital signal pin on a device
|
||||
|
||||
LoRa
|
||||
: A low-power, long-range wireless communication technology used by Meshtastic devices to enable communication over distances of several kilometers without the need for cellular, Wi-Fi, or other traditional network infrastructures.
|
||||
|
||||
LoS
|
||||
: Line of Sight, a pathway through only air between two points.
|
||||
|
||||
Mesh | [Algorithm](/docs/overview/mesh-algo/)
|
||||
: In the context of Meshtastic and networking, a mesh refers to a network topology where devices (nodes) are interconnected, allowing them to directly and dynamically communicate with each other. This setup enables data to be relayed across the network, improving coverage and reliability, especially in challenging environments.
|
||||
|
||||
Message
|
||||
: A piece of data or text sent between Meshtastic devices over the mesh network, which can include text communications, GPS location updates, and other small data payloads.
|
||||
|
||||
MHz
|
||||
: Megahertz, a unit of frequency equal to one million hertz (cycles per second), used to specify the operating frequency of LoRa devices in the Meshtastic network, affecting range and data rate.
|
||||
|
||||
Module | [Software Modules](/docs/configuration/module/) | [Hardware Modules](/docs/hardware/devices/)
|
||||
: At least two definitions in Meshtastic usage: 1) A software plug-in to expand the capabilities of a Meshtastic device. 2) A hardware component or add-on for a Meshtastic device, such as a temperature sensor or GPS.
|
||||
|
||||
[MQTT](/docs/software/integrations/mqtt/)
|
||||
: An acronym for Message Queuing Telemetry Transport, is a lightweight messaging protocol designed for small sensors and mobile devices, enabling efficient data transmission in the Meshtastic network for Internet connectivity and integration with IoT platforms. See https://en.wikipedia.org/wiki/MQTT. In Meshtastic, MQTT is used to connect a node to the internet, and can be used to connect multiple meshes to each other.
|
||||
|
||||
Node
|
||||
: A unit within the Meshtastic network that can send, receive, and relay messages, helping to form and extend the mesh network's coverage.
|
||||
|
||||
NRF52 | [Drivers](/docs/getting-started/serial-drivers/nrf52/) | [Firmware](/docs/getting-started/flashing-firmware/nrf52/)
|
||||
: A microcontroller chipset made by Nordic, used by a number of devices used by several devices such as the RAK Meshtastic Starter Kit and the Lilygo T-Echo. Lower power usage than ESP32.
|
||||
|
||||
Packet
|
||||
: A formatted unit of data sent over the network. In Meshtastic, packets carry messages, GPS locations, and other information through the LoRa mesh network.
|
||||
|
||||
Protobuf | [Reference](/docs/development/reference/protobufs/)
|
||||
: Protocol Buffers, a method developed by Google for serializing structured data, used in Meshtastic for efficient communication protocol between devices.
|
||||
|
||||
PSK | [Encryption](/docs/overview/encryption/)
|
||||
: Pre-Shared Key, a secret code or passphrase used in Meshtastic channels for encryption, ensuring that only devices with the matching PSK can communicate within that specific channel.
|
||||
|
||||
Repeater | [Role Definitions](/docs/configuration/radio/device/#roles)
|
||||
: Infrastructure node for extending network coverage by relaying messages with minimal overhead. Not visible in Nodes list.
|
||||
|
||||
Router | [Role Definitions](/docs/configuration/radio/device/#roles)
|
||||
: Infrastructure node for extending network coverage by relaying messages. Visible in Nodes list.
|
||||
|
||||
rp2040
|
||||
: A microcontroller chip developed by Raspberry Pi, featuring dual ARM Cortex-M0+ processors.
|
||||
|
||||
RX
|
||||
: Abbreviation for Receive.
|
||||
|
||||
Sensor
|
||||
: A device component that detects and responds to some type of input from the physical environment. In Meshtastic, sensors can be used to gather environmental data (e.g., temperature, humidity, GPS location) which can then be transmitted over the mesh network for monitoring or other applications.
|
||||
|
||||
Serial
|
||||
: A communication protocol used for the transmission of data between the Meshtastic device and a computer or other devices. Typically over USB or UART.
|
||||
|
||||
SNR
|
||||
: Signal-to-Noise Ratio, a measure used in communications to quantify the level of a desired signal to the level of background noise. In Meshtastic and other wireless systems, a higher SNR indicates a clearer signal that can enhance the reliability and quality of data transmission.
|
||||
|
||||
SWR
|
||||
: Standing Wave Ratio, a measure of the efficiency of the radio frequency (RF) power transmission from a transmitter through a transmission line to an antenna in Meshtastic devices. It indicates the ratio of the amplitude of a standing wave at maximum to the amplitude at minimum, with an ideal SWR close to 1:1, signifying that most of the power is transmitted to the antenna with minimal reflections.
|
||||
|
||||
Telemetry
|
||||
: The sending of sensor data or system metrics over the mesh network.
|
||||
|
||||
Tranceiver
|
||||
: A device capable of both transmitting and receiving communications.
|
||||
|
||||
Transmit
|
||||
: The act of sending data, such as messages or GPS locations, from one Meshtastic device to another over the LoRa network.
|
||||
|
||||
TX
|
||||
: Abbreviation for Transmit.
|
|
@ -1,6 +1,7 @@
|
|||
// @ts-check
|
||||
|
||||
require("dotenv").config();
|
||||
import remarkDefList from "remark-deflist";
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
|
@ -121,6 +122,7 @@ const config = {
|
|||
editUrl: "https://github.com/meshtastic/meshtastic/edit/master/",
|
||||
breadcrumbs: false,
|
||||
showLastUpdateAuthor: true,
|
||||
remarkPlugins: [remarkDefList],
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve("./src/css/custom.css"),
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-icons": "^4.12.0",
|
||||
"remark-deflist": "^1.0.0",
|
||||
"swr": "^2.2.4",
|
||||
"tailwindcss": "^3.4.1"
|
||||
},
|
||||
|
|
|
@ -56,6 +56,9 @@ dependencies:
|
|||
react-icons:
|
||||
specifier: ^4.12.0
|
||||
version: 4.12.0(react@18.2.0)
|
||||
remark-deflist:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0
|
||||
swr:
|
||||
specifier: ^2.2.4
|
||||
version: 2.2.4(react@18.2.0)
|
||||
|
@ -6689,6 +6692,13 @@ packages:
|
|||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
/mdast-util-phrasing@3.0.1:
|
||||
resolution: {integrity: sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==}
|
||||
dependencies:
|
||||
'@types/mdast': 3.0.15
|
||||
unist-util-is: 5.2.1
|
||||
dev: false
|
||||
|
||||
/mdast-util-phrasing@4.0.0:
|
||||
resolution: {integrity: sha512-xadSsJayQIucJ9n053dfQwVu1kuXg7jCTdYsMK8rqzKZh52nLfSH/k0sAxE0u+pj/zKZX+o5wB+ML5mRayOxFA==}
|
||||
dependencies:
|
||||
|
@ -6707,6 +6717,19 @@ packages:
|
|||
unist-util-position: 5.0.0
|
||||
unist-util-visit: 5.0.0
|
||||
|
||||
/mdast-util-to-markdown@1.5.0:
|
||||
resolution: {integrity: sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==}
|
||||
dependencies:
|
||||
'@types/mdast': 3.0.15
|
||||
'@types/unist': 2.0.10
|
||||
longest-streak: 3.1.0
|
||||
mdast-util-phrasing: 3.0.1
|
||||
mdast-util-to-string: 3.2.0
|
||||
micromark-util-decode-string: 1.1.0
|
||||
unist-util-visit: 4.1.2
|
||||
zwitch: 2.0.4
|
||||
dev: false
|
||||
|
||||
/mdast-util-to-markdown@2.1.0:
|
||||
resolution: {integrity: sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==}
|
||||
dependencies:
|
||||
|
@ -8671,6 +8694,17 @@ packages:
|
|||
engines: {node: '>= 0.10'}
|
||||
dev: false
|
||||
|
||||
/remark-deflist@1.0.0:
|
||||
resolution: {integrity: sha512-sDHM+ZbgWC6wwaxltMdH5x+XYMW8VpjyeHyC2ZCI106+iYgbPv8lBYKiNqdW0Cs0FVox/LysYhb3qIZe1b0cmg==}
|
||||
dependencies:
|
||||
mdast-util-from-markdown: 1.3.1
|
||||
mdast-util-to-markdown: 1.5.0
|
||||
mdast-util-to-string: 3.2.0
|
||||
unist-util-visit: 4.1.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/remark-directive@3.0.0:
|
||||
resolution: {integrity: sha512-l1UyWJ6Eg1VPU7Hm/9tt0zKtReJQNOA4+iDMAxTyZNWnJnFlbS/7zhiel/rogTLQ2vMYwDzSJa4BiVNqGlqIMA==}
|
||||
dependencies:
|
||||
|
@ -9598,6 +9632,12 @@ packages:
|
|||
crypto-random-string: 4.0.0
|
||||
dev: false
|
||||
|
||||
/unist-util-is@5.2.1:
|
||||
resolution: {integrity: sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==}
|
||||
dependencies:
|
||||
'@types/unist': 2.0.10
|
||||
dev: false
|
||||
|
||||
/unist-util-is@6.0.0:
|
||||
resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==}
|
||||
dependencies:
|
||||
|
@ -9630,12 +9670,27 @@ packages:
|
|||
dependencies:
|
||||
'@types/unist': 3.0.2
|
||||
|
||||
/unist-util-visit-parents@5.1.3:
|
||||
resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==}
|
||||
dependencies:
|
||||
'@types/unist': 2.0.10
|
||||
unist-util-is: 5.2.1
|
||||
dev: false
|
||||
|
||||
/unist-util-visit-parents@6.0.1:
|
||||
resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==}
|
||||
dependencies:
|
||||
'@types/unist': 3.0.2
|
||||
unist-util-is: 6.0.0
|
||||
|
||||
/unist-util-visit@4.1.2:
|
||||
resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==}
|
||||
dependencies:
|
||||
'@types/unist': 2.0.10
|
||||
unist-util-is: 5.2.1
|
||||
unist-util-visit-parents: 5.1.3
|
||||
dev: false
|
||||
|
||||
/unist-util-visit@5.0.0:
|
||||
resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==}
|
||||
dependencies:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Protobuf, Types } from "@meshtastic/js";
|
||||
import React, { useEffect } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
|
||||
interface Region {
|
||||
freqStart: number;
|
||||
|
@ -273,18 +273,18 @@ const modemPresets = new Map<
|
|||
|
||||
export const FrequencyCalculator = (): JSX.Element => {
|
||||
const [modemPreset, setModemPreset] =
|
||||
React.useState<Protobuf.Config.Config_LoRaConfig_ModemPreset>(
|
||||
useState<Protobuf.Config.Config_LoRaConfig_ModemPreset>(
|
||||
Protobuf.Config.Config_LoRaConfig_ModemPreset.LONG_FAST,
|
||||
);
|
||||
const [region, setRegion] =
|
||||
React.useState<Protobuf.Config.Config_LoRaConfig_RegionCode>(
|
||||
useState<Protobuf.Config.Config_LoRaConfig_RegionCode>(
|
||||
Protobuf.Config.Config_LoRaConfig_RegionCode.US,
|
||||
);
|
||||
const [channel, setChannel] = React.useState<Types.ChannelNumber>(
|
||||
Types.ChannelNumber.PRIMARY,
|
||||
const [channel, setChannel] = useState<Types.ChannelNumber>(
|
||||
Types.ChannelNumber.Primary,
|
||||
);
|
||||
const [numChannels, setNumChannels] = React.useState<number>(0);
|
||||
const [channelFrequency, setChannelFrequency] = React.useState<number>(0);
|
||||
const [numChannels, setNumChannels] = useState<number>(0);
|
||||
const [channelFrequency, setChannelFrequency] = useState<number>(0);
|
||||
|
||||
useEffect(() => {
|
||||
const selectedRegion = RegionData.get(region);
|
||||
|
@ -344,6 +344,12 @@ export const FrequencyCalculator = (): JSX.Element => {
|
|||
))}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-2 mb-4">
|
||||
<label className="font-semibold">Number of channels:</label>
|
||||
<input type="number" disabled={true} value={numChannels} />
|
||||
</div>
|
||||
|
||||
<div className="flex gap-2">
|
||||
<label>Channel:</label>
|
||||
<select
|
||||
|
@ -358,10 +364,6 @@ export const FrequencyCalculator = (): JSX.Element => {
|
|||
</select>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-2">
|
||||
<label className="font-semibold">Number of channels:</label>
|
||||
<input type="number" disabled={true} value={numChannels} />
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<label className="font-semibold">Channel Frequency:</label>
|
||||
<input type="number" disabled={true} value={channelFrequency} />
|
||||
|
|
Loading…
Reference in a new issue