mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 14:12:05 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
e3b1a71cae
@ -1,21 +1,22 @@
|
|||||||
version: 0.1
|
version: 0.1
|
||||||
cli:
|
cli:
|
||||||
version: 1.22.15
|
version: 1.24.0
|
||||||
plugins:
|
plugins:
|
||||||
sources:
|
sources:
|
||||||
- id: trunk
|
- id: trunk
|
||||||
ref: v1.6.8
|
ref: v1.7.0
|
||||||
uri: https://github.com/trunk-io/plugins
|
uri: https://github.com/trunk-io/plugins
|
||||||
lint:
|
lint:
|
||||||
enabled:
|
enabled:
|
||||||
- renovate@40.0.6
|
- checkov@3.2.435
|
||||||
|
- renovate@40.33.8
|
||||||
- prettier@3.5.3
|
- prettier@3.5.3
|
||||||
- trufflehog@3.88.32
|
- trufflehog@3.88.34
|
||||||
- yamllint@1.37.1
|
- yamllint@1.37.1
|
||||||
- bandit@1.8.3
|
- bandit@1.8.3
|
||||||
- trivy@0.62.1
|
- trivy@0.62.1
|
||||||
- taplo@0.9.3
|
- taplo@0.9.3
|
||||||
- ruff@0.11.10
|
- ruff@0.11.11
|
||||||
- isort@6.0.1
|
- isort@6.0.1
|
||||||
- markdownlint@0.45.0
|
- markdownlint@0.45.0
|
||||||
- oxipng@9.1.5
|
- oxipng@9.1.5
|
||||||
@ -37,7 +38,7 @@ runtimes:
|
|||||||
enabled:
|
enabled:
|
||||||
- python@3.10.8
|
- python@3.10.8
|
||||||
- go@1.21.0
|
- go@1.21.0
|
||||||
- node@18.20.5
|
- node@22.16.0
|
||||||
actions:
|
actions:
|
||||||
disabled:
|
disabled:
|
||||||
- trunk-announce
|
- trunk-announce
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
# Set spidev ownership to 'spi' group.
|
# Set spidev ownership to 'spi' group
|
||||||
SUBSYSTEM=="spidev", KERNEL=="spidev*", GROUP="spi", MODE="0660"
|
SUBSYSTEM=="spidev", KERNEL=="spidev*", GROUP="spi", MODE="0660"
|
||||||
# Allow access to USB CH341 devices
|
# Allow access to USB CH341 devices
|
||||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", MODE="0666"
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", MODE="0666"
|
||||||
|
# Set gpio ownership to 'gpio' group
|
||||||
|
SUBSYSTEM=="*gpiomem*", GROUP="gpio", MODE="0660"
|
||||||
|
SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
|
||||||
|
54
boards/seeed_wio_tracker_L1.json
Normal file
54
boards/seeed_wio_tracker_L1.json
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino": {
|
||||||
|
"ldscript": "nrf52840_s140_v7.ld"
|
||||||
|
},
|
||||||
|
"core": "nRF5",
|
||||||
|
"cpu": "cortex-m4",
|
||||||
|
"extra_flags": "-DARDUINO_MDBT50Q_RX -DNRF52840_XXAA",
|
||||||
|
"f_cpu": "64000000L",
|
||||||
|
"hwids": [["0x2886", "0x1668"]],
|
||||||
|
"usb_product": "TRACKER L1",
|
||||||
|
"mcu": "nrf52840",
|
||||||
|
"variant": "seeed_wio_tracker_L1",
|
||||||
|
"bsp": {
|
||||||
|
"name": "adafruit"
|
||||||
|
},
|
||||||
|
"softdevice": {
|
||||||
|
"sd_flags": "-DS140",
|
||||||
|
"sd_name": "s140",
|
||||||
|
"sd_version": "7.3.0",
|
||||||
|
"sd_fwid": "0x0123"
|
||||||
|
},
|
||||||
|
"bootloader": {
|
||||||
|
"settings_addr": "0xFF000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"connectivity": ["bluetooth"],
|
||||||
|
"debug": {
|
||||||
|
"jlink_device": "nRF52840_xxAA",
|
||||||
|
"svd_path": "nrf52840.svd",
|
||||||
|
"openocd_target": "nrf52840-mdk-rs"
|
||||||
|
},
|
||||||
|
"frameworks": ["arduino"],
|
||||||
|
"name": "seeed_wio_tracker_L1",
|
||||||
|
"upload": {
|
||||||
|
"maximum_ram_size": 248832,
|
||||||
|
"maximum_size": 815104,
|
||||||
|
"speed": 115200,
|
||||||
|
"protocol": "nrfutil",
|
||||||
|
"protocols": [
|
||||||
|
"jlink",
|
||||||
|
"nrfjprog",
|
||||||
|
"nrfutil",
|
||||||
|
"stlink",
|
||||||
|
"cmsis-dap",
|
||||||
|
"blackmagic"
|
||||||
|
],
|
||||||
|
"use_1200bps_touch": true,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"wait_for_upload_port": true
|
||||||
|
},
|
||||||
|
"url": "https://www.seeedstudio.com/Wio-Tracker-L1-p-6477.html",
|
||||||
|
"vendor": "Seeed Studio"
|
||||||
|
}
|
7
debian/meshtasticd.postinst
vendored
7
debian/meshtasticd.postinst
vendored
@ -20,16 +20,17 @@ set -e
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
configure|reconfigure)
|
configure|reconfigure)
|
||||||
# create spi group (for udev rules)
|
# create spi, gpio groups (for udev rules)
|
||||||
# this group already exists on Raspberry Pi OS
|
# these groups already exist on Raspberry Pi OS
|
||||||
getent group spi >/dev/null 2>/dev/null || addgroup --system spi
|
getent group spi >/dev/null 2>/dev/null || addgroup --system spi
|
||||||
|
getent group gpio >/dev/null 2>/dev/null || addgroup --system gpio
|
||||||
# create a meshtasticd group and user
|
# create a meshtasticd group and user
|
||||||
getent passwd meshtasticd >/dev/null 2>/dev/null || adduser --system --home /var/lib/meshtasticd --no-create-home meshtasticd
|
getent passwd meshtasticd >/dev/null 2>/dev/null || adduser --system --home /var/lib/meshtasticd --no-create-home meshtasticd
|
||||||
getent group meshtasticd >/dev/null 2>/dev/null || addgroup --system meshtasticd
|
getent group meshtasticd >/dev/null 2>/dev/null || addgroup --system meshtasticd
|
||||||
adduser meshtasticd meshtasticd >/dev/null 2>/dev/null
|
adduser meshtasticd meshtasticd >/dev/null 2>/dev/null
|
||||||
adduser meshtasticd spi >/dev/null 2>/dev/null
|
adduser meshtasticd spi >/dev/null 2>/dev/null
|
||||||
|
adduser meshtasticd gpio >/dev/null 2>/dev/null
|
||||||
# add meshtasticd user to appropriate groups (if they exist)
|
# add meshtasticd user to appropriate groups (if they exist)
|
||||||
getent group gpio >/dev/null 2>/dev/null && adduser meshtasticd gpio >/dev/null 2>/dev/null
|
|
||||||
getent group plugdev >/dev/null 2>/dev/null && adduser meshtasticd plugdev >/dev/null 2>/dev/null
|
getent group plugdev >/dev/null 2>/dev/null && adduser meshtasticd plugdev >/dev/null 2>/dev/null
|
||||||
getent group dialout >/dev/null 2>/dev/null && adduser meshtasticd dialout >/dev/null 2>/dev/null
|
getent group dialout >/dev/null 2>/dev/null && adduser meshtasticd dialout >/dev/null 2>/dev/null
|
||||||
getent group i2c >/dev/null 2>/dev/null && adduser meshtasticd i2c >/dev/null 2>/dev/null
|
getent group i2c >/dev/null 2>/dev/null && adduser meshtasticd i2c >/dev/null 2>/dev/null
|
||||||
|
5
debian/meshtasticd.udev
vendored
5
debian/meshtasticd.udev
vendored
@ -1,4 +1,7 @@
|
|||||||
# Set spidev ownership to 'spi' group.
|
# Set spidev ownership to 'spi' group
|
||||||
SUBSYSTEM=="spidev", KERNEL=="spidev*", GROUP="spi", MODE="0660"
|
SUBSYSTEM=="spidev", KERNEL=="spidev*", GROUP="spi", MODE="0660"
|
||||||
# Allow access to USB CH341 devices
|
# Allow access to USB CH341 devices
|
||||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", MODE="0666"
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", MODE="0666"
|
||||||
|
# Set gpio ownership to 'gpio' group
|
||||||
|
SUBSYSTEM=="*gpiomem*", GROUP="gpio", MODE="0660"
|
||||||
|
SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
|
||||||
|
@ -108,7 +108,7 @@ lib_deps =
|
|||||||
[device-ui_base]
|
[device-ui_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
||||||
https://github.com/meshtastic/device-ui/archive/e63b219e78e9655be10745b4037cefd2c608d258.zip
|
https://github.com/meshtastic/device-ui/archive/3dfcc973cdfec8b34719510952e160bbfb57d9df.zip
|
||||||
|
|
||||||
; Common libs for environmental measurements in telemetry module
|
; Common libs for environmental measurements in telemetry module
|
||||||
[environmental_base]
|
[environmental_base]
|
||||||
@ -161,6 +161,8 @@ lib_deps =
|
|||||||
sparkfun/SparkFun MAX3010x Pulse and Proximity Sensor Library@1.1.2
|
sparkfun/SparkFun MAX3010x Pulse and Proximity Sensor Library@1.1.2
|
||||||
# renovate: datasource=custom.pio depName=SparkFun 9DoF IMU Breakout ICM 20948 packageName=sparkfun/library/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library
|
# renovate: datasource=custom.pio depName=SparkFun 9DoF IMU Breakout ICM 20948 packageName=sparkfun/library/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library
|
||||||
sparkfun/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library@1.3.2
|
sparkfun/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library@1.3.2
|
||||||
|
# renovate: datasource=custom.pio depName=Adafruit LTR390 Library packageName=adafruit/library/Adafruit LTR390 Library
|
||||||
|
adafruit/Adafruit LTR390 Library@1.1.2
|
||||||
# renovate: datasource=custom.pio depName=Adafruit PCT2075 packageName=adafruit/Adafruit PCT2075
|
# renovate: datasource=custom.pio depName=Adafruit PCT2075 packageName=adafruit/Adafruit PCT2075
|
||||||
adafruit/Adafruit PCT2075@1.0.5
|
adafruit/Adafruit PCT2075@1.0.5
|
||||||
|
|
||||||
@ -190,4 +192,4 @@ lib_deps =
|
|||||||
# renovate: datasource=custom.pio depName=Bosch BME68x packageName=boschsensortec/library/BME68x Sensor Library
|
# renovate: datasource=custom.pio depName=Bosch BME68x packageName=boschsensortec/library/BME68x Sensor Library
|
||||||
boschsensortec/BME68x Sensor Library@1.3.40408
|
boschsensortec/BME68x Sensor Library@1.3.40408
|
||||||
# renovate: datasource=git-refs depName=meshtastic-DFRobot_LarkWeatherStation packageName=https://github.com/meshtastic/DFRobot_LarkWeatherStation gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-DFRobot_LarkWeatherStation packageName=https://github.com/meshtastic/DFRobot_LarkWeatherStation gitBranch=master
|
||||||
https://github.com/meshtastic/DFRobot_LarkWeatherStation/archive/4de3a9cadef0f6a5220a8a906cf9775b02b0040d.zip
|
https://github.com/meshtastic/DFRobot_LarkWeatherStation/archive/4de3a9cadef0f6a5220a8a906cf9775b02b0040d.zip
|
@ -1 +1 @@
|
|||||||
Subproject commit 91484534a58cb4da8ab68ac046f1e76fd1936bf7
|
Subproject commit 24c7a3d287a4bd269ce191827e5dabd8ce8f57a7
|
@ -99,8 +99,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// OLED & Input
|
// OLED & Input
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
#if defined(SEEED_WIO_TRACKER_L1)
|
||||||
|
#define SSD1306_ADDRESS 0x3D
|
||||||
|
#define USE_SH1106
|
||||||
|
#else
|
||||||
#define SSD1306_ADDRESS 0x3C
|
#define SSD1306_ADDRESS 0x3C
|
||||||
|
#endif
|
||||||
#define ST7567_ADDRESS 0x3F
|
#define ST7567_ADDRESS 0x3F
|
||||||
|
|
||||||
// The SH1106 controller is almost, but not quite, the same as SSD1306
|
// The SH1106 controller is almost, but not quite, the same as SSD1306
|
||||||
|
@ -111,9 +111,10 @@ void InkHUD::LogoApplet::onShutdown()
|
|||||||
|
|
||||||
// Prepare for the powered-off screen now
|
// Prepare for the powered-off screen now
|
||||||
// We can change these values because the initial "shutting down" screen has already rendered at this point
|
// We can change these values because the initial "shutting down" screen has already rendered at this point
|
||||||
|
meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());
|
||||||
textLeft = "";
|
textLeft = "";
|
||||||
textRight = "";
|
textRight = "";
|
||||||
textTitle = owner.short_name;
|
textTitle = parseShortName(ourNode);
|
||||||
fontTitle = fontLarge;
|
fontTitle = fontLarge;
|
||||||
|
|
||||||
// This is then drawn by InkHUD::Events::onShutdown, with a blocking FULL update, after InkHUD's flash write is complete
|
// This is then drawn by InkHUD::Events::onShutdown, with a blocking FULL update, after InkHUD's flash write is complete
|
||||||
|
@ -165,10 +165,15 @@ bool NextHopRouter::stopRetransmission(GlobalPacketId key)
|
|||||||
/* Only when we already transmitted a packet via LoRa, we will cancel the packet in the Tx queue
|
/* Only when we already transmitted a packet via LoRa, we will cancel the packet in the Tx queue
|
||||||
to avoid canceling a transmission if it was ACKed super fast via MQTT */
|
to avoid canceling a transmission if it was ACKed super fast via MQTT */
|
||||||
if (old->numRetransmissions < NUM_RELIABLE_RETX - 1) {
|
if (old->numRetransmissions < NUM_RELIABLE_RETX - 1) {
|
||||||
// remove the 'original' (identified by originator and packet->id) from the txqueue and free it
|
// We only cancel it if we are the original sender or if we're not a router(_late)/repeater
|
||||||
cancelSending(getFrom(p), p->id);
|
if (isFromUs(p) || (config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER &&
|
||||||
// now free the pooled copy for retransmission too
|
config.device.role != meshtastic_Config_DeviceConfig_Role_REPEATER &&
|
||||||
packetPool.release(p);
|
config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER_LATE)) {
|
||||||
|
// remove the 'original' (identified by originator and packet->id) from the txqueue and free it
|
||||||
|
cancelSending(getFrom(p), p->id);
|
||||||
|
// now free the pooled copy for retransmission too
|
||||||
|
packetPool.release(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
auto numErased = pending.erase(key);
|
auto numErased = pending.erase(key);
|
||||||
assert(numErased == 1);
|
assert(numErased == 1);
|
||||||
|
@ -18,6 +18,11 @@ PB_BIND(meshtastic_NodeRemoteHardwarePinsResponse, meshtastic_NodeRemoteHardware
|
|||||||
PB_BIND(meshtastic_SharedContact, meshtastic_SharedContact, AUTO)
|
PB_BIND(meshtastic_SharedContact, meshtastic_SharedContact, AUTO)
|
||||||
|
|
||||||
|
|
||||||
|
PB_BIND(meshtastic_KeyVerificationAdmin, meshtastic_KeyVerificationAdmin, AUTO)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,6 +77,19 @@ typedef enum _meshtastic_AdminMessage_BackupLocation {
|
|||||||
meshtastic_AdminMessage_BackupLocation_SD = 1
|
meshtastic_AdminMessage_BackupLocation_SD = 1
|
||||||
} meshtastic_AdminMessage_BackupLocation;
|
} meshtastic_AdminMessage_BackupLocation;
|
||||||
|
|
||||||
|
/* Three stages of this request. */
|
||||||
|
typedef enum _meshtastic_KeyVerificationAdmin_MessageType {
|
||||||
|
/* This is the first stage, where a client initiates */
|
||||||
|
meshtastic_KeyVerificationAdmin_MessageType_INITIATE_VERIFICATION = 0,
|
||||||
|
/* After the nonce has been returned over the mesh, the client prompts for the security number
|
||||||
|
And uses this message to provide it to the node. */
|
||||||
|
meshtastic_KeyVerificationAdmin_MessageType_PROVIDE_SECURITY_NUMBER = 1,
|
||||||
|
/* Once the user has compared the verification message, this message notifies the node. */
|
||||||
|
meshtastic_KeyVerificationAdmin_MessageType_DO_VERIFY = 2,
|
||||||
|
/* This is the cancel path, can be taken at any point */
|
||||||
|
meshtastic_KeyVerificationAdmin_MessageType_DO_NOT_VERIFY = 3
|
||||||
|
} meshtastic_KeyVerificationAdmin_MessageType;
|
||||||
|
|
||||||
/* Struct definitions */
|
/* Struct definitions */
|
||||||
/* Parameters for setting up Meshtastic for ameteur radio usage */
|
/* Parameters for setting up Meshtastic for ameteur radio usage */
|
||||||
typedef struct _meshtastic_HamParameters {
|
typedef struct _meshtastic_HamParameters {
|
||||||
@ -107,6 +120,18 @@ typedef struct _meshtastic_SharedContact {
|
|||||||
meshtastic_User user;
|
meshtastic_User user;
|
||||||
} meshtastic_SharedContact;
|
} meshtastic_SharedContact;
|
||||||
|
|
||||||
|
/* This message is used by a client to initiate or complete a key verification */
|
||||||
|
typedef struct _meshtastic_KeyVerificationAdmin {
|
||||||
|
meshtastic_KeyVerificationAdmin_MessageType message_type;
|
||||||
|
/* The nodenum we're requesting */
|
||||||
|
uint32_t remote_nodenum;
|
||||||
|
/* The nonce is used to track the connection */
|
||||||
|
uint64_t nonce;
|
||||||
|
/* The 4 digit code generated by the remote node, and communicated outside the mesh */
|
||||||
|
bool has_security_number;
|
||||||
|
uint32_t security_number;
|
||||||
|
} meshtastic_KeyVerificationAdmin;
|
||||||
|
|
||||||
typedef PB_BYTES_ARRAY_T(8) meshtastic_AdminMessage_session_passkey_t;
|
typedef PB_BYTES_ARRAY_T(8) meshtastic_AdminMessage_session_passkey_t;
|
||||||
/* This message is handled by the Admin module and is responsible for all settings/channel read/write operations.
|
/* This message is handled by the Admin module and is responsible for all settings/channel read/write operations.
|
||||||
This message is used to do settings operations to both remote AND local nodes.
|
This message is used to do settings operations to both remote AND local nodes.
|
||||||
@ -212,6 +237,8 @@ typedef struct _meshtastic_AdminMessage {
|
|||||||
bool commit_edit_settings;
|
bool commit_edit_settings;
|
||||||
/* Add a contact (User) to the nodedb */
|
/* Add a contact (User) to the nodedb */
|
||||||
meshtastic_SharedContact add_contact;
|
meshtastic_SharedContact add_contact;
|
||||||
|
/* Initiate or respond to a key verification request */
|
||||||
|
meshtastic_KeyVerificationAdmin key_verification;
|
||||||
/* Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared. */
|
/* Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared. */
|
||||||
int32_t factory_reset_device;
|
int32_t factory_reset_device;
|
||||||
/* Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot)
|
/* Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot)
|
||||||
@ -253,6 +280,10 @@ extern "C" {
|
|||||||
#define _meshtastic_AdminMessage_BackupLocation_MAX meshtastic_AdminMessage_BackupLocation_SD
|
#define _meshtastic_AdminMessage_BackupLocation_MAX meshtastic_AdminMessage_BackupLocation_SD
|
||||||
#define _meshtastic_AdminMessage_BackupLocation_ARRAYSIZE ((meshtastic_AdminMessage_BackupLocation)(meshtastic_AdminMessage_BackupLocation_SD+1))
|
#define _meshtastic_AdminMessage_BackupLocation_ARRAYSIZE ((meshtastic_AdminMessage_BackupLocation)(meshtastic_AdminMessage_BackupLocation_SD+1))
|
||||||
|
|
||||||
|
#define _meshtastic_KeyVerificationAdmin_MessageType_MIN meshtastic_KeyVerificationAdmin_MessageType_INITIATE_VERIFICATION
|
||||||
|
#define _meshtastic_KeyVerificationAdmin_MessageType_MAX meshtastic_KeyVerificationAdmin_MessageType_DO_NOT_VERIFY
|
||||||
|
#define _meshtastic_KeyVerificationAdmin_MessageType_ARRAYSIZE ((meshtastic_KeyVerificationAdmin_MessageType)(meshtastic_KeyVerificationAdmin_MessageType_DO_NOT_VERIFY+1))
|
||||||
|
|
||||||
#define meshtastic_AdminMessage_payload_variant_get_config_request_ENUMTYPE meshtastic_AdminMessage_ConfigType
|
#define meshtastic_AdminMessage_payload_variant_get_config_request_ENUMTYPE meshtastic_AdminMessage_ConfigType
|
||||||
#define meshtastic_AdminMessage_payload_variant_get_module_config_request_ENUMTYPE meshtastic_AdminMessage_ModuleConfigType
|
#define meshtastic_AdminMessage_payload_variant_get_module_config_request_ENUMTYPE meshtastic_AdminMessage_ModuleConfigType
|
||||||
#define meshtastic_AdminMessage_payload_variant_backup_preferences_ENUMTYPE meshtastic_AdminMessage_BackupLocation
|
#define meshtastic_AdminMessage_payload_variant_backup_preferences_ENUMTYPE meshtastic_AdminMessage_BackupLocation
|
||||||
@ -262,16 +293,20 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define meshtastic_KeyVerificationAdmin_message_type_ENUMTYPE meshtastic_KeyVerificationAdmin_MessageType
|
||||||
|
|
||||||
|
|
||||||
/* Initializer values for message structs */
|
/* Initializer values for message structs */
|
||||||
#define meshtastic_AdminMessage_init_default {0, {0}, {0, {0}}}
|
#define meshtastic_AdminMessage_init_default {0, {0}, {0, {0}}}
|
||||||
#define meshtastic_HamParameters_init_default {"", 0, 0, ""}
|
#define meshtastic_HamParameters_init_default {"", 0, 0, ""}
|
||||||
#define meshtastic_NodeRemoteHardwarePinsResponse_init_default {0, {meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default}}
|
#define meshtastic_NodeRemoteHardwarePinsResponse_init_default {0, {meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default}}
|
||||||
#define meshtastic_SharedContact_init_default {0, false, meshtastic_User_init_default}
|
#define meshtastic_SharedContact_init_default {0, false, meshtastic_User_init_default}
|
||||||
|
#define meshtastic_KeyVerificationAdmin_init_default {_meshtastic_KeyVerificationAdmin_MessageType_MIN, 0, 0, false, 0}
|
||||||
#define meshtastic_AdminMessage_init_zero {0, {0}, {0, {0}}}
|
#define meshtastic_AdminMessage_init_zero {0, {0}, {0, {0}}}
|
||||||
#define meshtastic_HamParameters_init_zero {"", 0, 0, ""}
|
#define meshtastic_HamParameters_init_zero {"", 0, 0, ""}
|
||||||
#define meshtastic_NodeRemoteHardwarePinsResponse_init_zero {0, {meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero}}
|
#define meshtastic_NodeRemoteHardwarePinsResponse_init_zero {0, {meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero}}
|
||||||
#define meshtastic_SharedContact_init_zero {0, false, meshtastic_User_init_zero}
|
#define meshtastic_SharedContact_init_zero {0, false, meshtastic_User_init_zero}
|
||||||
|
#define meshtastic_KeyVerificationAdmin_init_zero {_meshtastic_KeyVerificationAdmin_MessageType_MIN, 0, 0, false, 0}
|
||||||
|
|
||||||
/* Field tags (for use in manual encoding/decoding) */
|
/* Field tags (for use in manual encoding/decoding) */
|
||||||
#define meshtastic_HamParameters_call_sign_tag 1
|
#define meshtastic_HamParameters_call_sign_tag 1
|
||||||
@ -281,6 +316,10 @@ extern "C" {
|
|||||||
#define meshtastic_NodeRemoteHardwarePinsResponse_node_remote_hardware_pins_tag 1
|
#define meshtastic_NodeRemoteHardwarePinsResponse_node_remote_hardware_pins_tag 1
|
||||||
#define meshtastic_SharedContact_node_num_tag 1
|
#define meshtastic_SharedContact_node_num_tag 1
|
||||||
#define meshtastic_SharedContact_user_tag 2
|
#define meshtastic_SharedContact_user_tag 2
|
||||||
|
#define meshtastic_KeyVerificationAdmin_message_type_tag 1
|
||||||
|
#define meshtastic_KeyVerificationAdmin_remote_nodenum_tag 2
|
||||||
|
#define meshtastic_KeyVerificationAdmin_nonce_tag 3
|
||||||
|
#define meshtastic_KeyVerificationAdmin_security_number_tag 4
|
||||||
#define meshtastic_AdminMessage_get_channel_request_tag 1
|
#define meshtastic_AdminMessage_get_channel_request_tag 1
|
||||||
#define meshtastic_AdminMessage_get_channel_response_tag 2
|
#define meshtastic_AdminMessage_get_channel_response_tag 2
|
||||||
#define meshtastic_AdminMessage_get_owner_request_tag 3
|
#define meshtastic_AdminMessage_get_owner_request_tag 3
|
||||||
@ -326,6 +365,7 @@ extern "C" {
|
|||||||
#define meshtastic_AdminMessage_begin_edit_settings_tag 64
|
#define meshtastic_AdminMessage_begin_edit_settings_tag 64
|
||||||
#define meshtastic_AdminMessage_commit_edit_settings_tag 65
|
#define meshtastic_AdminMessage_commit_edit_settings_tag 65
|
||||||
#define meshtastic_AdminMessage_add_contact_tag 66
|
#define meshtastic_AdminMessage_add_contact_tag 66
|
||||||
|
#define meshtastic_AdminMessage_key_verification_tag 67
|
||||||
#define meshtastic_AdminMessage_factory_reset_device_tag 94
|
#define meshtastic_AdminMessage_factory_reset_device_tag 94
|
||||||
#define meshtastic_AdminMessage_reboot_ota_seconds_tag 95
|
#define meshtastic_AdminMessage_reboot_ota_seconds_tag 95
|
||||||
#define meshtastic_AdminMessage_exit_simulator_tag 96
|
#define meshtastic_AdminMessage_exit_simulator_tag 96
|
||||||
@ -382,6 +422,7 @@ X(a, STATIC, ONEOF, UINT32, (payload_variant,remove_ignored_node,remove_i
|
|||||||
X(a, STATIC, ONEOF, BOOL, (payload_variant,begin_edit_settings,begin_edit_settings), 64) \
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,begin_edit_settings,begin_edit_settings), 64) \
|
||||||
X(a, STATIC, ONEOF, BOOL, (payload_variant,commit_edit_settings,commit_edit_settings), 65) \
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,commit_edit_settings,commit_edit_settings), 65) \
|
||||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,add_contact,add_contact), 66) \
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,add_contact,add_contact), 66) \
|
||||||
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,key_verification,key_verification), 67) \
|
||||||
X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset_device,factory_reset_device), 94) \
|
X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset_device,factory_reset_device), 94) \
|
||||||
X(a, STATIC, ONEOF, INT32, (payload_variant,reboot_ota_seconds,reboot_ota_seconds), 95) \
|
X(a, STATIC, ONEOF, INT32, (payload_variant,reboot_ota_seconds,reboot_ota_seconds), 95) \
|
||||||
X(a, STATIC, ONEOF, BOOL, (payload_variant,exit_simulator,exit_simulator), 96) \
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,exit_simulator,exit_simulator), 96) \
|
||||||
@ -408,6 +449,7 @@ X(a, STATIC, SINGULAR, BYTES, session_passkey, 101)
|
|||||||
#define meshtastic_AdminMessage_payload_variant_get_ui_config_response_MSGTYPE meshtastic_DeviceUIConfig
|
#define meshtastic_AdminMessage_payload_variant_get_ui_config_response_MSGTYPE meshtastic_DeviceUIConfig
|
||||||
#define meshtastic_AdminMessage_payload_variant_store_ui_config_MSGTYPE meshtastic_DeviceUIConfig
|
#define meshtastic_AdminMessage_payload_variant_store_ui_config_MSGTYPE meshtastic_DeviceUIConfig
|
||||||
#define meshtastic_AdminMessage_payload_variant_add_contact_MSGTYPE meshtastic_SharedContact
|
#define meshtastic_AdminMessage_payload_variant_add_contact_MSGTYPE meshtastic_SharedContact
|
||||||
|
#define meshtastic_AdminMessage_payload_variant_key_verification_MSGTYPE meshtastic_KeyVerificationAdmin
|
||||||
|
|
||||||
#define meshtastic_HamParameters_FIELDLIST(X, a) \
|
#define meshtastic_HamParameters_FIELDLIST(X, a) \
|
||||||
X(a, STATIC, SINGULAR, STRING, call_sign, 1) \
|
X(a, STATIC, SINGULAR, STRING, call_sign, 1) \
|
||||||
@ -430,21 +472,32 @@ X(a, STATIC, OPTIONAL, MESSAGE, user, 2)
|
|||||||
#define meshtastic_SharedContact_DEFAULT NULL
|
#define meshtastic_SharedContact_DEFAULT NULL
|
||||||
#define meshtastic_SharedContact_user_MSGTYPE meshtastic_User
|
#define meshtastic_SharedContact_user_MSGTYPE meshtastic_User
|
||||||
|
|
||||||
|
#define meshtastic_KeyVerificationAdmin_FIELDLIST(X, a) \
|
||||||
|
X(a, STATIC, SINGULAR, UENUM, message_type, 1) \
|
||||||
|
X(a, STATIC, SINGULAR, UINT32, remote_nodenum, 2) \
|
||||||
|
X(a, STATIC, SINGULAR, UINT64, nonce, 3) \
|
||||||
|
X(a, STATIC, OPTIONAL, UINT32, security_number, 4)
|
||||||
|
#define meshtastic_KeyVerificationAdmin_CALLBACK NULL
|
||||||
|
#define meshtastic_KeyVerificationAdmin_DEFAULT NULL
|
||||||
|
|
||||||
extern const pb_msgdesc_t meshtastic_AdminMessage_msg;
|
extern const pb_msgdesc_t meshtastic_AdminMessage_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_HamParameters_msg;
|
extern const pb_msgdesc_t meshtastic_HamParameters_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_NodeRemoteHardwarePinsResponse_msg;
|
extern const pb_msgdesc_t meshtastic_NodeRemoteHardwarePinsResponse_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_SharedContact_msg;
|
extern const pb_msgdesc_t meshtastic_SharedContact_msg;
|
||||||
|
extern const pb_msgdesc_t meshtastic_KeyVerificationAdmin_msg;
|
||||||
|
|
||||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||||
#define meshtastic_AdminMessage_fields &meshtastic_AdminMessage_msg
|
#define meshtastic_AdminMessage_fields &meshtastic_AdminMessage_msg
|
||||||
#define meshtastic_HamParameters_fields &meshtastic_HamParameters_msg
|
#define meshtastic_HamParameters_fields &meshtastic_HamParameters_msg
|
||||||
#define meshtastic_NodeRemoteHardwarePinsResponse_fields &meshtastic_NodeRemoteHardwarePinsResponse_msg
|
#define meshtastic_NodeRemoteHardwarePinsResponse_fields &meshtastic_NodeRemoteHardwarePinsResponse_msg
|
||||||
#define meshtastic_SharedContact_fields &meshtastic_SharedContact_msg
|
#define meshtastic_SharedContact_fields &meshtastic_SharedContact_msg
|
||||||
|
#define meshtastic_KeyVerificationAdmin_fields &meshtastic_KeyVerificationAdmin_msg
|
||||||
|
|
||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
#define MESHTASTIC_MESHTASTIC_ADMIN_PB_H_MAX_SIZE meshtastic_AdminMessage_size
|
#define MESHTASTIC_MESHTASTIC_ADMIN_PB_H_MAX_SIZE meshtastic_AdminMessage_size
|
||||||
#define meshtastic_AdminMessage_size 511
|
#define meshtastic_AdminMessage_size 511
|
||||||
#define meshtastic_HamParameters_size 31
|
#define meshtastic_HamParameters_size 31
|
||||||
|
#define meshtastic_KeyVerificationAdmin_size 25
|
||||||
#define meshtastic_NodeRemoteHardwarePinsResponse_size 496
|
#define meshtastic_NodeRemoteHardwarePinsResponse_size 496
|
||||||
#define meshtastic_SharedContact_size 123
|
#define meshtastic_SharedContact_size 123
|
||||||
|
|
||||||
|
@ -441,6 +441,8 @@ typedef struct _meshtastic_Config_NetworkConfig {
|
|||||||
char rsyslog_server[33];
|
char rsyslog_server[33];
|
||||||
/* Flags for enabling/disabling network protocols */
|
/* Flags for enabling/disabling network protocols */
|
||||||
uint32_t enabled_protocols;
|
uint32_t enabled_protocols;
|
||||||
|
/* Enable/Disable ipv6 support */
|
||||||
|
bool ipv6_enabled;
|
||||||
} meshtastic_Config_NetworkConfig;
|
} meshtastic_Config_NetworkConfig;
|
||||||
|
|
||||||
/* Display Config */
|
/* Display Config */
|
||||||
@ -693,7 +695,7 @@ extern "C" {
|
|||||||
#define meshtastic_Config_DeviceConfig_init_default {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
#define meshtastic_Config_DeviceConfig_init_default {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
||||||
#define meshtastic_Config_PositionConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}
|
#define meshtastic_Config_PositionConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}
|
||||||
#define meshtastic_Config_PowerConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_Config_PowerConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_Config_NetworkConfig_init_default {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_default, "", 0}
|
#define meshtastic_Config_NetworkConfig_init_default {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_default, "", 0, 0}
|
||||||
#define meshtastic_Config_NetworkConfig_IpV4Config_init_default {0, 0, 0, 0}
|
#define meshtastic_Config_NetworkConfig_IpV4Config_init_default {0, 0, 0, 0}
|
||||||
#define meshtastic_Config_DisplayConfig_init_default {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN, 0}
|
#define meshtastic_Config_DisplayConfig_init_default {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN, 0}
|
||||||
#define meshtastic_Config_LoRaConfig_init_default {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0}
|
#define meshtastic_Config_LoRaConfig_init_default {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0}
|
||||||
@ -704,7 +706,7 @@ extern "C" {
|
|||||||
#define meshtastic_Config_DeviceConfig_init_zero {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
#define meshtastic_Config_DeviceConfig_init_zero {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
||||||
#define meshtastic_Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}
|
#define meshtastic_Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}
|
||||||
#define meshtastic_Config_PowerConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_Config_PowerConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_Config_NetworkConfig_init_zero {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_zero, "", 0}
|
#define meshtastic_Config_NetworkConfig_init_zero {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_zero, "", 0, 0}
|
||||||
#define meshtastic_Config_NetworkConfig_IpV4Config_init_zero {0, 0, 0, 0}
|
#define meshtastic_Config_NetworkConfig_IpV4Config_init_zero {0, 0, 0, 0}
|
||||||
#define meshtastic_Config_DisplayConfig_init_zero {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN, 0}
|
#define meshtastic_Config_DisplayConfig_init_zero {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN, 0}
|
||||||
#define meshtastic_Config_LoRaConfig_init_zero {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0}
|
#define meshtastic_Config_LoRaConfig_init_zero {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0}
|
||||||
@ -759,6 +761,7 @@ extern "C" {
|
|||||||
#define meshtastic_Config_NetworkConfig_ipv4_config_tag 8
|
#define meshtastic_Config_NetworkConfig_ipv4_config_tag 8
|
||||||
#define meshtastic_Config_NetworkConfig_rsyslog_server_tag 9
|
#define meshtastic_Config_NetworkConfig_rsyslog_server_tag 9
|
||||||
#define meshtastic_Config_NetworkConfig_enabled_protocols_tag 10
|
#define meshtastic_Config_NetworkConfig_enabled_protocols_tag 10
|
||||||
|
#define meshtastic_Config_NetworkConfig_ipv6_enabled_tag 11
|
||||||
#define meshtastic_Config_DisplayConfig_screen_on_secs_tag 1
|
#define meshtastic_Config_DisplayConfig_screen_on_secs_tag 1
|
||||||
#define meshtastic_Config_DisplayConfig_gps_format_tag 2
|
#define meshtastic_Config_DisplayConfig_gps_format_tag 2
|
||||||
#define meshtastic_Config_DisplayConfig_auto_screen_carousel_secs_tag 3
|
#define meshtastic_Config_DisplayConfig_auto_screen_carousel_secs_tag 3
|
||||||
@ -889,7 +892,8 @@ X(a, STATIC, SINGULAR, BOOL, eth_enabled, 6) \
|
|||||||
X(a, STATIC, SINGULAR, UENUM, address_mode, 7) \
|
X(a, STATIC, SINGULAR, UENUM, address_mode, 7) \
|
||||||
X(a, STATIC, OPTIONAL, MESSAGE, ipv4_config, 8) \
|
X(a, STATIC, OPTIONAL, MESSAGE, ipv4_config, 8) \
|
||||||
X(a, STATIC, SINGULAR, STRING, rsyslog_server, 9) \
|
X(a, STATIC, SINGULAR, STRING, rsyslog_server, 9) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, enabled_protocols, 10)
|
X(a, STATIC, SINGULAR, UINT32, enabled_protocols, 10) \
|
||||||
|
X(a, STATIC, SINGULAR, BOOL, ipv6_enabled, 11)
|
||||||
#define meshtastic_Config_NetworkConfig_CALLBACK NULL
|
#define meshtastic_Config_NetworkConfig_CALLBACK NULL
|
||||||
#define meshtastic_Config_NetworkConfig_DEFAULT NULL
|
#define meshtastic_Config_NetworkConfig_DEFAULT NULL
|
||||||
#define meshtastic_Config_NetworkConfig_ipv4_config_MSGTYPE meshtastic_Config_NetworkConfig_IpV4Config
|
#define meshtastic_Config_NetworkConfig_ipv4_config_MSGTYPE meshtastic_Config_NetworkConfig_IpV4Config
|
||||||
@ -995,12 +999,12 @@ extern const pb_msgdesc_t meshtastic_Config_SessionkeyConfig_msg;
|
|||||||
#define meshtastic_Config_DisplayConfig_size 32
|
#define meshtastic_Config_DisplayConfig_size 32
|
||||||
#define meshtastic_Config_LoRaConfig_size 85
|
#define meshtastic_Config_LoRaConfig_size 85
|
||||||
#define meshtastic_Config_NetworkConfig_IpV4Config_size 20
|
#define meshtastic_Config_NetworkConfig_IpV4Config_size 20
|
||||||
#define meshtastic_Config_NetworkConfig_size 202
|
#define meshtastic_Config_NetworkConfig_size 204
|
||||||
#define meshtastic_Config_PositionConfig_size 62
|
#define meshtastic_Config_PositionConfig_size 62
|
||||||
#define meshtastic_Config_PowerConfig_size 52
|
#define meshtastic_Config_PowerConfig_size 52
|
||||||
#define meshtastic_Config_SecurityConfig_size 178
|
#define meshtastic_Config_SecurityConfig_size 178
|
||||||
#define meshtastic_Config_SessionkeyConfig_size 0
|
#define meshtastic_Config_SessionkeyConfig_size 0
|
||||||
#define meshtastic_Config_size 205
|
#define meshtastic_Config_size 207
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
@ -360,7 +360,7 @@ extern const pb_msgdesc_t meshtastic_BackupPreferences_msg;
|
|||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
/* meshtastic_NodeDatabase_size depends on runtime parameters */
|
/* meshtastic_NodeDatabase_size depends on runtime parameters */
|
||||||
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_BackupPreferences_size
|
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_BackupPreferences_size
|
||||||
#define meshtastic_BackupPreferences_size 2267
|
#define meshtastic_BackupPreferences_size 2269
|
||||||
#define meshtastic_ChannelFile_size 718
|
#define meshtastic_ChannelFile_size 718
|
||||||
#define meshtastic_DeviceState_size 1722
|
#define meshtastic_DeviceState_size 1722
|
||||||
#define meshtastic_NodeInfoLite_size 196
|
#define meshtastic_NodeInfoLite_size 196
|
||||||
|
@ -187,7 +187,7 @@ extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg;
|
|||||||
|
|
||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalConfig_size
|
#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalConfig_size
|
||||||
#define meshtastic_LocalConfig_size 743
|
#define meshtastic_LocalConfig_size 745
|
||||||
#define meshtastic_LocalModuleConfig_size 669
|
#define meshtastic_LocalModuleConfig_size 669
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -21,6 +21,9 @@ PB_BIND(meshtastic_Routing, meshtastic_Routing, AUTO)
|
|||||||
PB_BIND(meshtastic_Data, meshtastic_Data, 2)
|
PB_BIND(meshtastic_Data, meshtastic_Data, 2)
|
||||||
|
|
||||||
|
|
||||||
|
PB_BIND(meshtastic_KeyVerification, meshtastic_KeyVerification, AUTO)
|
||||||
|
|
||||||
|
|
||||||
PB_BIND(meshtastic_Waypoint, meshtastic_Waypoint, AUTO)
|
PB_BIND(meshtastic_Waypoint, meshtastic_Waypoint, AUTO)
|
||||||
|
|
||||||
|
|
||||||
@ -48,6 +51,15 @@ PB_BIND(meshtastic_FromRadio, meshtastic_FromRadio, 2)
|
|||||||
PB_BIND(meshtastic_ClientNotification, meshtastic_ClientNotification, 2)
|
PB_BIND(meshtastic_ClientNotification, meshtastic_ClientNotification, 2)
|
||||||
|
|
||||||
|
|
||||||
|
PB_BIND(meshtastic_KeyVerificationNumberInform, meshtastic_KeyVerificationNumberInform, AUTO)
|
||||||
|
|
||||||
|
|
||||||
|
PB_BIND(meshtastic_KeyVerificationNumberRequest, meshtastic_KeyVerificationNumberRequest, AUTO)
|
||||||
|
|
||||||
|
|
||||||
|
PB_BIND(meshtastic_KeyVerificationFinal, meshtastic_KeyVerificationFinal, AUTO)
|
||||||
|
|
||||||
|
|
||||||
PB_BIND(meshtastic_FileInfo, meshtastic_FileInfo, AUTO)
|
PB_BIND(meshtastic_FileInfo, meshtastic_FileInfo, AUTO)
|
||||||
|
|
||||||
|
|
||||||
|
@ -247,6 +247,17 @@ typedef enum _meshtastic_HardwareModel {
|
|||||||
meshtastic_HardwareModel_NOMADSTAR_METEOR_PRO = 96,
|
meshtastic_HardwareModel_NOMADSTAR_METEOR_PRO = 96,
|
||||||
/* Elecrow CrowPanel Advance models, ESP32-S3 and TFT with SX1262 radio plugin */
|
/* Elecrow CrowPanel Advance models, ESP32-S3 and TFT with SX1262 radio plugin */
|
||||||
meshtastic_HardwareModel_CROWPANEL = 97,
|
meshtastic_HardwareModel_CROWPANEL = 97,
|
||||||
|
/* *
|
||||||
|
Lilygo LINK32 board with sensors */
|
||||||
|
meshtastic_HardwareModel_LINK_32 = 98,
|
||||||
|
/* *
|
||||||
|
Seeed Tracker L1 */
|
||||||
|
meshtastic_HardwareModel_SEEED_WIO_TRACKER_L1 = 99,
|
||||||
|
/* *
|
||||||
|
Seeed Tracker L1 EINK driver */
|
||||||
|
meshtastic_HardwareModel_SEEED_WIO_TRACKER_L1_EINK = 100,
|
||||||
|
/* Reserved ID for future and past use */
|
||||||
|
meshtastic_HardwareModel_QWANTZ_TINY_ARMS = 101,
|
||||||
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------ */
|
------------------------------------------------------------------------------------------------------------------------------------------ */
|
||||||
@ -680,6 +691,19 @@ typedef struct _meshtastic_Data {
|
|||||||
uint8_t bitfield;
|
uint8_t bitfield;
|
||||||
} meshtastic_Data;
|
} meshtastic_Data;
|
||||||
|
|
||||||
|
typedef PB_BYTES_ARRAY_T(32) meshtastic_KeyVerification_hash1_t;
|
||||||
|
typedef PB_BYTES_ARRAY_T(32) meshtastic_KeyVerification_hash2_t;
|
||||||
|
/* The actual over-the-mesh message doing KeyVerification */
|
||||||
|
typedef struct _meshtastic_KeyVerification {
|
||||||
|
/* random value Selected by the requesting node */
|
||||||
|
uint64_t nonce;
|
||||||
|
/* The final authoritative hash, only to be sent by NodeA at the end of the handshake */
|
||||||
|
meshtastic_KeyVerification_hash1_t hash1;
|
||||||
|
/* The intermediary hash (actually derived from hash1),
|
||||||
|
sent from NodeB to NodeA in response to the initial message. */
|
||||||
|
meshtastic_KeyVerification_hash2_t hash2;
|
||||||
|
} meshtastic_KeyVerification;
|
||||||
|
|
||||||
/* Waypoint message, used to share arbitrary locations across the mesh */
|
/* Waypoint message, used to share arbitrary locations across the mesh */
|
||||||
typedef struct _meshtastic_Waypoint {
|
typedef struct _meshtastic_Waypoint {
|
||||||
/* Id of the waypoint */
|
/* Id of the waypoint */
|
||||||
@ -907,6 +931,24 @@ typedef struct _meshtastic_QueueStatus {
|
|||||||
uint32_t mesh_packet_id;
|
uint32_t mesh_packet_id;
|
||||||
} meshtastic_QueueStatus;
|
} meshtastic_QueueStatus;
|
||||||
|
|
||||||
|
typedef struct _meshtastic_KeyVerificationNumberInform {
|
||||||
|
uint64_t nonce;
|
||||||
|
char remote_longname[40];
|
||||||
|
uint32_t security_number;
|
||||||
|
} meshtastic_KeyVerificationNumberInform;
|
||||||
|
|
||||||
|
typedef struct _meshtastic_KeyVerificationNumberRequest {
|
||||||
|
uint64_t nonce;
|
||||||
|
char remote_longname[40];
|
||||||
|
} meshtastic_KeyVerificationNumberRequest;
|
||||||
|
|
||||||
|
typedef struct _meshtastic_KeyVerificationFinal {
|
||||||
|
uint64_t nonce;
|
||||||
|
char remote_longname[40];
|
||||||
|
bool isSender;
|
||||||
|
char verification_characters[10];
|
||||||
|
} meshtastic_KeyVerificationFinal;
|
||||||
|
|
||||||
/* A notification message from the device to the client
|
/* A notification message from the device to the client
|
||||||
To be used for important messages that should to be displayed to the user
|
To be used for important messages that should to be displayed to the user
|
||||||
in the form of push notifications or validation messages when saving
|
in the form of push notifications or validation messages when saving
|
||||||
@ -921,6 +963,12 @@ typedef struct _meshtastic_ClientNotification {
|
|||||||
meshtastic_LogRecord_Level level;
|
meshtastic_LogRecord_Level level;
|
||||||
/* The message body of the notification */
|
/* The message body of the notification */
|
||||||
char message[400];
|
char message[400];
|
||||||
|
pb_size_t which_payload_variant;
|
||||||
|
union {
|
||||||
|
meshtastic_KeyVerificationNumberInform key_verification_number_inform;
|
||||||
|
meshtastic_KeyVerificationNumberRequest key_verification_number_request;
|
||||||
|
meshtastic_KeyVerificationFinal key_verification_final;
|
||||||
|
} payload_variant;
|
||||||
} meshtastic_ClientNotification;
|
} meshtastic_ClientNotification;
|
||||||
|
|
||||||
/* Individual File info for the device */
|
/* Individual File info for the device */
|
||||||
@ -1183,6 +1231,7 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define meshtastic_MeshPacket_priority_ENUMTYPE meshtastic_MeshPacket_Priority
|
#define meshtastic_MeshPacket_priority_ENUMTYPE meshtastic_MeshPacket_Priority
|
||||||
#define meshtastic_MeshPacket_delayed_ENUMTYPE meshtastic_MeshPacket_Delayed
|
#define meshtastic_MeshPacket_delayed_ENUMTYPE meshtastic_MeshPacket_Delayed
|
||||||
|
|
||||||
@ -1196,6 +1245,9 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define meshtastic_Compressed_portnum_ENUMTYPE meshtastic_PortNum
|
#define meshtastic_Compressed_portnum_ENUMTYPE meshtastic_PortNum
|
||||||
|
|
||||||
|
|
||||||
@ -1215,6 +1267,7 @@ extern "C" {
|
|||||||
#define meshtastic_RouteDiscovery_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
#define meshtastic_RouteDiscovery_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||||
#define meshtastic_Routing_init_default {0, {meshtastic_RouteDiscovery_init_default}}
|
#define meshtastic_Routing_init_default {0, {meshtastic_RouteDiscovery_init_default}}
|
||||||
#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}
|
#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}
|
||||||
|
#define meshtastic_KeyVerification_init_default {0, {0, {0}}, {0, {0}}}
|
||||||
#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0}
|
#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||||
#define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0}
|
#define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0}
|
||||||
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0}
|
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0}
|
||||||
@ -1223,7 +1276,10 @@ extern "C" {
|
|||||||
#define meshtastic_LogRecord_init_default {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
#define meshtastic_LogRecord_init_default {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
||||||
#define meshtastic_QueueStatus_init_default {0, 0, 0, 0}
|
#define meshtastic_QueueStatus_init_default {0, 0, 0, 0}
|
||||||
#define meshtastic_FromRadio_init_default {0, 0, {meshtastic_MeshPacket_init_default}}
|
#define meshtastic_FromRadio_init_default {0, 0, {meshtastic_MeshPacket_init_default}}
|
||||||
#define meshtastic_ClientNotification_init_default {false, 0, 0, _meshtastic_LogRecord_Level_MIN, ""}
|
#define meshtastic_ClientNotification_init_default {false, 0, 0, _meshtastic_LogRecord_Level_MIN, "", 0, {meshtastic_KeyVerificationNumberInform_init_default}}
|
||||||
|
#define meshtastic_KeyVerificationNumberInform_init_default {0, "", 0}
|
||||||
|
#define meshtastic_KeyVerificationNumberRequest_init_default {0, ""}
|
||||||
|
#define meshtastic_KeyVerificationFinal_init_default {0, "", 0, ""}
|
||||||
#define meshtastic_FileInfo_init_default {"", 0}
|
#define meshtastic_FileInfo_init_default {"", 0}
|
||||||
#define meshtastic_ToRadio_init_default {0, {meshtastic_MeshPacket_init_default}}
|
#define meshtastic_ToRadio_init_default {0, {meshtastic_MeshPacket_init_default}}
|
||||||
#define meshtastic_Compressed_init_default {_meshtastic_PortNum_MIN, {0, {0}}}
|
#define meshtastic_Compressed_init_default {_meshtastic_PortNum_MIN, {0, {0}}}
|
||||||
@ -1240,6 +1296,7 @@ extern "C" {
|
|||||||
#define meshtastic_RouteDiscovery_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
#define meshtastic_RouteDiscovery_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||||
#define meshtastic_Routing_init_zero {0, {meshtastic_RouteDiscovery_init_zero}}
|
#define meshtastic_Routing_init_zero {0, {meshtastic_RouteDiscovery_init_zero}}
|
||||||
#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}
|
#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}
|
||||||
|
#define meshtastic_KeyVerification_init_zero {0, {0, {0}}, {0, {0}}}
|
||||||
#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0}
|
#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||||
#define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0}
|
#define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0}
|
||||||
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0}
|
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0}
|
||||||
@ -1248,7 +1305,10 @@ extern "C" {
|
|||||||
#define meshtastic_LogRecord_init_zero {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
#define meshtastic_LogRecord_init_zero {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
||||||
#define meshtastic_QueueStatus_init_zero {0, 0, 0, 0}
|
#define meshtastic_QueueStatus_init_zero {0, 0, 0, 0}
|
||||||
#define meshtastic_FromRadio_init_zero {0, 0, {meshtastic_MeshPacket_init_zero}}
|
#define meshtastic_FromRadio_init_zero {0, 0, {meshtastic_MeshPacket_init_zero}}
|
||||||
#define meshtastic_ClientNotification_init_zero {false, 0, 0, _meshtastic_LogRecord_Level_MIN, ""}
|
#define meshtastic_ClientNotification_init_zero {false, 0, 0, _meshtastic_LogRecord_Level_MIN, "", 0, {meshtastic_KeyVerificationNumberInform_init_zero}}
|
||||||
|
#define meshtastic_KeyVerificationNumberInform_init_zero {0, "", 0}
|
||||||
|
#define meshtastic_KeyVerificationNumberRequest_init_zero {0, ""}
|
||||||
|
#define meshtastic_KeyVerificationFinal_init_zero {0, "", 0, ""}
|
||||||
#define meshtastic_FileInfo_init_zero {"", 0}
|
#define meshtastic_FileInfo_init_zero {"", 0}
|
||||||
#define meshtastic_ToRadio_init_zero {0, {meshtastic_MeshPacket_init_zero}}
|
#define meshtastic_ToRadio_init_zero {0, {meshtastic_MeshPacket_init_zero}}
|
||||||
#define meshtastic_Compressed_init_zero {_meshtastic_PortNum_MIN, {0, {0}}}
|
#define meshtastic_Compressed_init_zero {_meshtastic_PortNum_MIN, {0, {0}}}
|
||||||
@ -1310,6 +1370,9 @@ extern "C" {
|
|||||||
#define meshtastic_Data_reply_id_tag 7
|
#define meshtastic_Data_reply_id_tag 7
|
||||||
#define meshtastic_Data_emoji_tag 8
|
#define meshtastic_Data_emoji_tag 8
|
||||||
#define meshtastic_Data_bitfield_tag 9
|
#define meshtastic_Data_bitfield_tag 9
|
||||||
|
#define meshtastic_KeyVerification_nonce_tag 1
|
||||||
|
#define meshtastic_KeyVerification_hash1_tag 2
|
||||||
|
#define meshtastic_KeyVerification_hash2_tag 3
|
||||||
#define meshtastic_Waypoint_id_tag 1
|
#define meshtastic_Waypoint_id_tag 1
|
||||||
#define meshtastic_Waypoint_latitude_i_tag 2
|
#define meshtastic_Waypoint_latitude_i_tag 2
|
||||||
#define meshtastic_Waypoint_longitude_i_tag 3
|
#define meshtastic_Waypoint_longitude_i_tag 3
|
||||||
@ -1367,10 +1430,22 @@ extern "C" {
|
|||||||
#define meshtastic_QueueStatus_free_tag 2
|
#define meshtastic_QueueStatus_free_tag 2
|
||||||
#define meshtastic_QueueStatus_maxlen_tag 3
|
#define meshtastic_QueueStatus_maxlen_tag 3
|
||||||
#define meshtastic_QueueStatus_mesh_packet_id_tag 4
|
#define meshtastic_QueueStatus_mesh_packet_id_tag 4
|
||||||
|
#define meshtastic_KeyVerificationNumberInform_nonce_tag 1
|
||||||
|
#define meshtastic_KeyVerificationNumberInform_remote_longname_tag 2
|
||||||
|
#define meshtastic_KeyVerificationNumberInform_security_number_tag 3
|
||||||
|
#define meshtastic_KeyVerificationNumberRequest_nonce_tag 1
|
||||||
|
#define meshtastic_KeyVerificationNumberRequest_remote_longname_tag 2
|
||||||
|
#define meshtastic_KeyVerificationFinal_nonce_tag 1
|
||||||
|
#define meshtastic_KeyVerificationFinal_remote_longname_tag 2
|
||||||
|
#define meshtastic_KeyVerificationFinal_isSender_tag 3
|
||||||
|
#define meshtastic_KeyVerificationFinal_verification_characters_tag 4
|
||||||
#define meshtastic_ClientNotification_reply_id_tag 1
|
#define meshtastic_ClientNotification_reply_id_tag 1
|
||||||
#define meshtastic_ClientNotification_time_tag 2
|
#define meshtastic_ClientNotification_time_tag 2
|
||||||
#define meshtastic_ClientNotification_level_tag 3
|
#define meshtastic_ClientNotification_level_tag 3
|
||||||
#define meshtastic_ClientNotification_message_tag 4
|
#define meshtastic_ClientNotification_message_tag 4
|
||||||
|
#define meshtastic_ClientNotification_key_verification_number_inform_tag 11
|
||||||
|
#define meshtastic_ClientNotification_key_verification_number_request_tag 12
|
||||||
|
#define meshtastic_ClientNotification_key_verification_final_tag 13
|
||||||
#define meshtastic_FileInfo_file_name_tag 1
|
#define meshtastic_FileInfo_file_name_tag 1
|
||||||
#define meshtastic_FileInfo_size_bytes_tag 2
|
#define meshtastic_FileInfo_size_bytes_tag 2
|
||||||
#define meshtastic_Compressed_portnum_tag 1
|
#define meshtastic_Compressed_portnum_tag 1
|
||||||
@ -1501,6 +1576,13 @@ X(a, STATIC, OPTIONAL, UINT32, bitfield, 9)
|
|||||||
#define meshtastic_Data_CALLBACK NULL
|
#define meshtastic_Data_CALLBACK NULL
|
||||||
#define meshtastic_Data_DEFAULT NULL
|
#define meshtastic_Data_DEFAULT NULL
|
||||||
|
|
||||||
|
#define meshtastic_KeyVerification_FIELDLIST(X, a) \
|
||||||
|
X(a, STATIC, SINGULAR, UINT64, nonce, 1) \
|
||||||
|
X(a, STATIC, SINGULAR, BYTES, hash1, 2) \
|
||||||
|
X(a, STATIC, SINGULAR, BYTES, hash2, 3)
|
||||||
|
#define meshtastic_KeyVerification_CALLBACK NULL
|
||||||
|
#define meshtastic_KeyVerification_DEFAULT NULL
|
||||||
|
|
||||||
#define meshtastic_Waypoint_FIELDLIST(X, a) \
|
#define meshtastic_Waypoint_FIELDLIST(X, a) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, id, 1) \
|
X(a, STATIC, SINGULAR, UINT32, id, 1) \
|
||||||
X(a, STATIC, OPTIONAL, SFIXED32, latitude_i, 2) \
|
X(a, STATIC, OPTIONAL, SFIXED32, latitude_i, 2) \
|
||||||
@ -1629,9 +1711,36 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,deviceuiConfig,deviceuiConfi
|
|||||||
X(a, STATIC, OPTIONAL, UINT32, reply_id, 1) \
|
X(a, STATIC, OPTIONAL, UINT32, reply_id, 1) \
|
||||||
X(a, STATIC, SINGULAR, FIXED32, time, 2) \
|
X(a, STATIC, SINGULAR, FIXED32, time, 2) \
|
||||||
X(a, STATIC, SINGULAR, UENUM, level, 3) \
|
X(a, STATIC, SINGULAR, UENUM, level, 3) \
|
||||||
X(a, STATIC, SINGULAR, STRING, message, 4)
|
X(a, STATIC, SINGULAR, STRING, message, 4) \
|
||||||
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,key_verification_number_inform,payload_variant.key_verification_number_inform), 11) \
|
||||||
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,key_verification_number_request,payload_variant.key_verification_number_request), 12) \
|
||||||
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,key_verification_final,payload_variant.key_verification_final), 13)
|
||||||
#define meshtastic_ClientNotification_CALLBACK NULL
|
#define meshtastic_ClientNotification_CALLBACK NULL
|
||||||
#define meshtastic_ClientNotification_DEFAULT NULL
|
#define meshtastic_ClientNotification_DEFAULT NULL
|
||||||
|
#define meshtastic_ClientNotification_payload_variant_key_verification_number_inform_MSGTYPE meshtastic_KeyVerificationNumberInform
|
||||||
|
#define meshtastic_ClientNotification_payload_variant_key_verification_number_request_MSGTYPE meshtastic_KeyVerificationNumberRequest
|
||||||
|
#define meshtastic_ClientNotification_payload_variant_key_verification_final_MSGTYPE meshtastic_KeyVerificationFinal
|
||||||
|
|
||||||
|
#define meshtastic_KeyVerificationNumberInform_FIELDLIST(X, a) \
|
||||||
|
X(a, STATIC, SINGULAR, UINT64, nonce, 1) \
|
||||||
|
X(a, STATIC, SINGULAR, STRING, remote_longname, 2) \
|
||||||
|
X(a, STATIC, SINGULAR, UINT32, security_number, 3)
|
||||||
|
#define meshtastic_KeyVerificationNumberInform_CALLBACK NULL
|
||||||
|
#define meshtastic_KeyVerificationNumberInform_DEFAULT NULL
|
||||||
|
|
||||||
|
#define meshtastic_KeyVerificationNumberRequest_FIELDLIST(X, a) \
|
||||||
|
X(a, STATIC, SINGULAR, UINT64, nonce, 1) \
|
||||||
|
X(a, STATIC, SINGULAR, STRING, remote_longname, 2)
|
||||||
|
#define meshtastic_KeyVerificationNumberRequest_CALLBACK NULL
|
||||||
|
#define meshtastic_KeyVerificationNumberRequest_DEFAULT NULL
|
||||||
|
|
||||||
|
#define meshtastic_KeyVerificationFinal_FIELDLIST(X, a) \
|
||||||
|
X(a, STATIC, SINGULAR, UINT64, nonce, 1) \
|
||||||
|
X(a, STATIC, SINGULAR, STRING, remote_longname, 2) \
|
||||||
|
X(a, STATIC, SINGULAR, BOOL, isSender, 3) \
|
||||||
|
X(a, STATIC, SINGULAR, STRING, verification_characters, 4)
|
||||||
|
#define meshtastic_KeyVerificationFinal_CALLBACK NULL
|
||||||
|
#define meshtastic_KeyVerificationFinal_DEFAULT NULL
|
||||||
|
|
||||||
#define meshtastic_FileInfo_FIELDLIST(X, a) \
|
#define meshtastic_FileInfo_FIELDLIST(X, a) \
|
||||||
X(a, STATIC, SINGULAR, STRING, file_name, 1) \
|
X(a, STATIC, SINGULAR, STRING, file_name, 1) \
|
||||||
@ -1731,6 +1840,7 @@ extern const pb_msgdesc_t meshtastic_User_msg;
|
|||||||
extern const pb_msgdesc_t meshtastic_RouteDiscovery_msg;
|
extern const pb_msgdesc_t meshtastic_RouteDiscovery_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_Routing_msg;
|
extern const pb_msgdesc_t meshtastic_Routing_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_Data_msg;
|
extern const pb_msgdesc_t meshtastic_Data_msg;
|
||||||
|
extern const pb_msgdesc_t meshtastic_KeyVerification_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_Waypoint_msg;
|
extern const pb_msgdesc_t meshtastic_Waypoint_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_MqttClientProxyMessage_msg;
|
extern const pb_msgdesc_t meshtastic_MqttClientProxyMessage_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_MeshPacket_msg;
|
extern const pb_msgdesc_t meshtastic_MeshPacket_msg;
|
||||||
@ -1740,6 +1850,9 @@ extern const pb_msgdesc_t meshtastic_LogRecord_msg;
|
|||||||
extern const pb_msgdesc_t meshtastic_QueueStatus_msg;
|
extern const pb_msgdesc_t meshtastic_QueueStatus_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_FromRadio_msg;
|
extern const pb_msgdesc_t meshtastic_FromRadio_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_ClientNotification_msg;
|
extern const pb_msgdesc_t meshtastic_ClientNotification_msg;
|
||||||
|
extern const pb_msgdesc_t meshtastic_KeyVerificationNumberInform_msg;
|
||||||
|
extern const pb_msgdesc_t meshtastic_KeyVerificationNumberRequest_msg;
|
||||||
|
extern const pb_msgdesc_t meshtastic_KeyVerificationFinal_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_FileInfo_msg;
|
extern const pb_msgdesc_t meshtastic_FileInfo_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_ToRadio_msg;
|
extern const pb_msgdesc_t meshtastic_ToRadio_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_Compressed_msg;
|
extern const pb_msgdesc_t meshtastic_Compressed_msg;
|
||||||
@ -1758,6 +1871,7 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
|||||||
#define meshtastic_RouteDiscovery_fields &meshtastic_RouteDiscovery_msg
|
#define meshtastic_RouteDiscovery_fields &meshtastic_RouteDiscovery_msg
|
||||||
#define meshtastic_Routing_fields &meshtastic_Routing_msg
|
#define meshtastic_Routing_fields &meshtastic_Routing_msg
|
||||||
#define meshtastic_Data_fields &meshtastic_Data_msg
|
#define meshtastic_Data_fields &meshtastic_Data_msg
|
||||||
|
#define meshtastic_KeyVerification_fields &meshtastic_KeyVerification_msg
|
||||||
#define meshtastic_Waypoint_fields &meshtastic_Waypoint_msg
|
#define meshtastic_Waypoint_fields &meshtastic_Waypoint_msg
|
||||||
#define meshtastic_MqttClientProxyMessage_fields &meshtastic_MqttClientProxyMessage_msg
|
#define meshtastic_MqttClientProxyMessage_fields &meshtastic_MqttClientProxyMessage_msg
|
||||||
#define meshtastic_MeshPacket_fields &meshtastic_MeshPacket_msg
|
#define meshtastic_MeshPacket_fields &meshtastic_MeshPacket_msg
|
||||||
@ -1767,6 +1881,9 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
|||||||
#define meshtastic_QueueStatus_fields &meshtastic_QueueStatus_msg
|
#define meshtastic_QueueStatus_fields &meshtastic_QueueStatus_msg
|
||||||
#define meshtastic_FromRadio_fields &meshtastic_FromRadio_msg
|
#define meshtastic_FromRadio_fields &meshtastic_FromRadio_msg
|
||||||
#define meshtastic_ClientNotification_fields &meshtastic_ClientNotification_msg
|
#define meshtastic_ClientNotification_fields &meshtastic_ClientNotification_msg
|
||||||
|
#define meshtastic_KeyVerificationNumberInform_fields &meshtastic_KeyVerificationNumberInform_msg
|
||||||
|
#define meshtastic_KeyVerificationNumberRequest_fields &meshtastic_KeyVerificationNumberRequest_msg
|
||||||
|
#define meshtastic_KeyVerificationFinal_fields &meshtastic_KeyVerificationFinal_msg
|
||||||
#define meshtastic_FileInfo_fields &meshtastic_FileInfo_msg
|
#define meshtastic_FileInfo_fields &meshtastic_FileInfo_msg
|
||||||
#define meshtastic_ToRadio_fields &meshtastic_ToRadio_msg
|
#define meshtastic_ToRadio_fields &meshtastic_ToRadio_msg
|
||||||
#define meshtastic_Compressed_fields &meshtastic_Compressed_msg
|
#define meshtastic_Compressed_fields &meshtastic_Compressed_msg
|
||||||
@ -1784,13 +1901,17 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
|||||||
/* meshtastic_ChunkedPayloadResponse_size depends on runtime parameters */
|
/* meshtastic_ChunkedPayloadResponse_size depends on runtime parameters */
|
||||||
#define MESHTASTIC_MESHTASTIC_MESH_PB_H_MAX_SIZE meshtastic_FromRadio_size
|
#define MESHTASTIC_MESHTASTIC_MESH_PB_H_MAX_SIZE meshtastic_FromRadio_size
|
||||||
#define meshtastic_ChunkedPayload_size 245
|
#define meshtastic_ChunkedPayload_size 245
|
||||||
#define meshtastic_ClientNotification_size 415
|
#define meshtastic_ClientNotification_size 482
|
||||||
#define meshtastic_Compressed_size 239
|
#define meshtastic_Compressed_size 239
|
||||||
#define meshtastic_Data_size 269
|
#define meshtastic_Data_size 269
|
||||||
#define meshtastic_DeviceMetadata_size 54
|
#define meshtastic_DeviceMetadata_size 54
|
||||||
#define meshtastic_FileInfo_size 236
|
#define meshtastic_FileInfo_size 236
|
||||||
#define meshtastic_FromRadio_size 510
|
#define meshtastic_FromRadio_size 510
|
||||||
#define meshtastic_Heartbeat_size 0
|
#define meshtastic_Heartbeat_size 0
|
||||||
|
#define meshtastic_KeyVerificationFinal_size 65
|
||||||
|
#define meshtastic_KeyVerificationNumberInform_size 58
|
||||||
|
#define meshtastic_KeyVerificationNumberRequest_size 52
|
||||||
|
#define meshtastic_KeyVerification_size 79
|
||||||
#define meshtastic_LogRecord_size 426
|
#define meshtastic_LogRecord_size 426
|
||||||
#define meshtastic_MeshPacket_size 378
|
#define meshtastic_MeshPacket_size 378
|
||||||
#define meshtastic_MqttClientProxyMessage_size 501
|
#define meshtastic_MqttClientProxyMessage_size 501
|
||||||
|
@ -74,6 +74,8 @@ typedef enum _meshtastic_PortNum {
|
|||||||
meshtastic_PortNum_DETECTION_SENSOR_APP = 10,
|
meshtastic_PortNum_DETECTION_SENSOR_APP = 10,
|
||||||
/* Same as Text Message but used for critical alerts. */
|
/* Same as Text Message but used for critical alerts. */
|
||||||
meshtastic_PortNum_ALERT_APP = 11,
|
meshtastic_PortNum_ALERT_APP = 11,
|
||||||
|
/* Module/port for handling key verification requests. */
|
||||||
|
meshtastic_PortNum_KEY_VERIFICATION_APP = 12,
|
||||||
/* Provides a 'ping' service that replies to any packet it receives.
|
/* Provides a 'ping' service that replies to any packet it receives.
|
||||||
Also serves as a small example module.
|
Also serves as a small example module.
|
||||||
ENCODING: ASCII Plaintext */
|
ENCODING: ASCII Plaintext */
|
||||||
|
@ -14,6 +14,9 @@ bool NodeInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mes
|
|||||||
{
|
{
|
||||||
auto p = *pptr;
|
auto p = *pptr;
|
||||||
|
|
||||||
|
// Coerce user.id to be derived from the node number
|
||||||
|
snprintf(p.id, sizeof(p.id), "!%08x", getFrom(&mp));
|
||||||
|
|
||||||
bool hasChanged = nodeDB->updateUser(getFrom(&mp), p, mp.channel);
|
bool hasChanged = nodeDB->updateUser(getFrom(&mp), p, mp.channel);
|
||||||
|
|
||||||
bool wasBroadcast = isBroadcast(mp.to);
|
bool wasBroadcast = isBroadcast(mp.to);
|
||||||
|
@ -52,6 +52,13 @@ BMP280Sensor bmp280Sensor;
|
|||||||
NullSensor bme280Sensor;
|
NullSensor bme280Sensor;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __has_include(<Adafruit_LTR390.h>)
|
||||||
|
#include "Sensor/LTR390UVSensor.h"
|
||||||
|
LTR390UVSensor ltr390uvSensor;
|
||||||
|
#else
|
||||||
|
NullSensor ltr390uvSensor;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if __has_include(<bsec2.h>)
|
#if __has_include(<bsec2.h>)
|
||||||
#include "Sensor/BME680Sensor.h"
|
#include "Sensor/BME680Sensor.h"
|
||||||
BME680Sensor bme680Sensor;
|
BME680Sensor bme680Sensor;
|
||||||
@ -231,6 +238,8 @@ int32_t EnvironmentTelemetryModule::runOnce()
|
|||||||
#endif
|
#endif
|
||||||
if (bme280Sensor.hasSensor())
|
if (bme280Sensor.hasSensor())
|
||||||
result = bme280Sensor.runOnce();
|
result = bme280Sensor.runOnce();
|
||||||
|
if (ltr390uvSensor.hasSensor())
|
||||||
|
result = ltr390uvSensor.runOnce();
|
||||||
if (bmp3xxSensor.hasSensor())
|
if (bmp3xxSensor.hasSensor())
|
||||||
result = bmp3xxSensor.runOnce();
|
result = bmp3xxSensor.runOnce();
|
||||||
if (bme680Sensor.hasSensor())
|
if (bme680Sensor.hasSensor())
|
||||||
@ -524,6 +533,10 @@ bool EnvironmentTelemetryModule::getEnvironmentTelemetry(meshtastic_Telemetry *m
|
|||||||
valid = valid && bme280Sensor.getMetrics(m);
|
valid = valid && bme280Sensor.getMetrics(m);
|
||||||
hasSensor = true;
|
hasSensor = true;
|
||||||
}
|
}
|
||||||
|
if (ltr390uvSensor.hasSensor()) {
|
||||||
|
valid = valid && ltr390uvSensor.getMetrics(m);
|
||||||
|
hasSensor = true;
|
||||||
|
}
|
||||||
if (bmp3xxSensor.hasSensor()) {
|
if (bmp3xxSensor.hasSensor()) {
|
||||||
valid = valid && bmp3xxSensor.getMetrics(m);
|
valid = valid && bmp3xxSensor.getMetrics(m);
|
||||||
hasSensor = true;
|
hasSensor = true;
|
||||||
@ -752,6 +765,11 @@ AdminMessageHandleResult EnvironmentTelemetryModule::handleAdminMessageForModule
|
|||||||
if (result != AdminMessageHandleResult::NOT_HANDLED)
|
if (result != AdminMessageHandleResult::NOT_HANDLED)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
if (ltr390uvSensor.hasSensor()) {
|
||||||
|
result = ltr390uvSensor.handleAdminMessage(mp, request, response);
|
||||||
|
if (result != AdminMessageHandleResult::NOT_HANDLED)
|
||||||
|
return result;
|
||||||
|
}
|
||||||
if (bmp3xxSensor.hasSensor()) {
|
if (bmp3xxSensor.hasSensor()) {
|
||||||
result = bmp3xxSensor.handleAdminMessage(mp, request, response);
|
result = bmp3xxSensor.handleAdminMessage(mp, request, response);
|
||||||
if (result != AdminMessageHandleResult::NOT_HANDLED)
|
if (result != AdminMessageHandleResult::NOT_HANDLED)
|
||||||
|
73
src/modules/Telemetry/Sensor/LTR390UVSensor.cpp
Normal file
73
src/modules/Telemetry/Sensor/LTR390UVSensor.cpp
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
#include "configuration.h"
|
||||||
|
|
||||||
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_LTR390.h>)
|
||||||
|
|
||||||
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||||
|
#include "LTR390UVSensor.h"
|
||||||
|
#include "TelemetrySensor.h"
|
||||||
|
#include <Adafruit_LTR390.h>
|
||||||
|
|
||||||
|
LTR390UVSensor::LTR390UVSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_LTR390UV, "LTR390UV") {}
|
||||||
|
|
||||||
|
int32_t LTR390UVSensor::runOnce()
|
||||||
|
{
|
||||||
|
LOG_INFO("Init sensor: %s", sensorName);
|
||||||
|
if (!hasSensor()) {
|
||||||
|
return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = ltr390uv.begin(nodeTelemetrySensorsMap[sensorType].second);
|
||||||
|
ltr390uv.setMode(LTR390_MODE_UVS);
|
||||||
|
ltr390uv.setGain(LTR390_GAIN_18); // Datasheet default
|
||||||
|
ltr390uv.setResolution(LTR390_RESOLUTION_20BIT); // Datasheet default
|
||||||
|
|
||||||
|
return initI2CSensor();
|
||||||
|
}
|
||||||
|
|
||||||
|
void LTR390UVSensor::setup() {}
|
||||||
|
|
||||||
|
bool LTR390UVSensor::getMetrics(meshtastic_Telemetry *measurement)
|
||||||
|
{
|
||||||
|
LOG_DEBUG("LTR390UV getMetrics");
|
||||||
|
|
||||||
|
// Because the sensor does not measure Lux and UV at the same time, we need to read them in two passes.
|
||||||
|
if (ltr390uv.newDataAvailable()) {
|
||||||
|
measurement->variant.environment_metrics.has_lux = true;
|
||||||
|
measurement->variant.environment_metrics.has_uv_lux = true;
|
||||||
|
|
||||||
|
if (ltr390uv.getMode() == LTR390_MODE_ALS) {
|
||||||
|
lastLuxReading = 0.6 * ltr390uv.readALS() / (1 * 4); // Datasheet page 23 for gain x1 and 20bit resolution
|
||||||
|
LOG_DEBUG("LTR390UV Lux reading: %f", lastLuxReading);
|
||||||
|
|
||||||
|
measurement->variant.environment_metrics.lux = lastLuxReading;
|
||||||
|
measurement->variant.environment_metrics.uv_lux = lastUVReading;
|
||||||
|
|
||||||
|
ltr390uv.setGain(
|
||||||
|
LTR390_GAIN_18); // Recommended for UVI - x18. Do not change, 2300 UV Sensitivity only specified for x18 gain
|
||||||
|
ltr390uv.setMode(LTR390_MODE_UVS);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
} else if (ltr390uv.getMode() == LTR390_MODE_UVS) {
|
||||||
|
lastUVReading = ltr390uv.readUVS() /
|
||||||
|
2300.f; // Datasheet page 23 and page 6, only characterisation for gain x18 and 20bit resolution
|
||||||
|
LOG_DEBUG("LTR390UV UV reading: %f", lastUVReading);
|
||||||
|
|
||||||
|
measurement->variant.environment_metrics.lux = lastLuxReading;
|
||||||
|
measurement->variant.environment_metrics.uv_lux = lastUVReading;
|
||||||
|
|
||||||
|
ltr390uv.setGain(
|
||||||
|
LTR390_GAIN_1); // x1 gain will already max out the sensor at direct sunlight, so no need to increase it
|
||||||
|
ltr390uv.setMode(LTR390_MODE_ALS);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// In case we fail to read the sensor mode, set the has_lux and has_uv_lux back to false
|
||||||
|
measurement->variant.environment_metrics.has_lux = false;
|
||||||
|
measurement->variant.environment_metrics.has_uv_lux = false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
25
src/modules/Telemetry/Sensor/LTR390UVSensor.h
Normal file
25
src/modules/Telemetry/Sensor/LTR390UVSensor.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#include "configuration.h"
|
||||||
|
|
||||||
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_LTR390.h>)
|
||||||
|
|
||||||
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||||
|
#include "TelemetrySensor.h"
|
||||||
|
#include <Adafruit_LTR390.h>
|
||||||
|
|
||||||
|
class LTR390UVSensor : public TelemetrySensor
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
Adafruit_LTR390 ltr390uv = Adafruit_LTR390();
|
||||||
|
float lastLuxReading = 0;
|
||||||
|
float lastUVReading = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void setup() override;
|
||||||
|
|
||||||
|
public:
|
||||||
|
LTR390UVSensor();
|
||||||
|
virtual int32_t runOnce() override;
|
||||||
|
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -184,6 +184,8 @@
|
|||||||
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_SENSOR_HUB
|
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_SENSOR_HUB
|
||||||
#elif defined(ELECROW_PANEL)
|
#elif defined(ELECROW_PANEL)
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_CROWPANEL
|
#define HW_VENDOR meshtastic_HardwareModel_CROWPANEL
|
||||||
|
#elif defined(LINK_32)
|
||||||
|
#define HW_VENDOR meshtastic_HardwareModel_LINK_32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
@ -85,6 +85,8 @@
|
|||||||
#define HW_VENDOR meshtastic_HardwareModel_SEEED_SOLAR_NODE
|
#define HW_VENDOR meshtastic_HardwareModel_SEEED_SOLAR_NODE
|
||||||
#elif defined(HELTEC_MESH_POCKET)
|
#elif defined(HELTEC_MESH_POCKET)
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_MESH_POCKET
|
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_MESH_POCKET
|
||||||
|
#elif defined(SEEED_WIO_TRACKER_L1)
|
||||||
|
#define HW_VENDOR meshtastic_HardwareModel_SEEED_WIO_TRACKER_L1
|
||||||
#else
|
#else
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_NRF52_UNKNOWN
|
#define HW_VENDOR meshtastic_HardwareModel_NRF52_UNKNOWN
|
||||||
#endif
|
#endif
|
||||||
|
19
variants/link32_s3_v1/pins_arduino.h
Normal file
19
variants/link32_s3_v1/pins_arduino.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#ifndef Pins_Arduino_h
|
||||||
|
#define Pins_Arduino_h
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define USB_VID 0x303a
|
||||||
|
#define USB_PID 0x1001
|
||||||
|
|
||||||
|
// The default Wire will be mapped to PMU and RTC
|
||||||
|
static const uint8_t SDA = 47;
|
||||||
|
static const uint8_t SCL = 48;
|
||||||
|
|
||||||
|
// Default SPI will be mapped to Radio
|
||||||
|
static const uint8_t SS = 21;
|
||||||
|
static const uint8_t MOSI = 34;
|
||||||
|
static const uint8_t MISO = 33;
|
||||||
|
static const uint8_t SCK = 16;
|
||||||
|
|
||||||
|
#endif /* Pins_Arduino_h */
|
11
variants/link32_s3_v1/platformio.ini
Normal file
11
variants/link32_s3_v1/platformio.ini
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[env:link32-s3-v1]
|
||||||
|
extends = esp32s3_base
|
||||||
|
board = esp32-s3-devkitc-1
|
||||||
|
build_flags =
|
||||||
|
${esp32_base.build_flags} -D LINK_32 -I variants/link32_s3_v1
|
||||||
|
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||||
|
-DARDUINO_USB_CDC_ON_BOOT
|
||||||
|
-DARDUINO_USB_MODE=1
|
||||||
|
-DRADIOLIB_EXCLUDE_SX128X=1
|
||||||
|
-DRADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-DRADIOLIB_EXCLUDE_LR11X0=1
|
42
variants/link32_s3_v1/variant.h
Normal file
42
variants/link32_s3_v1/variant.h
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#define BATTERY_PIN 15
|
||||||
|
#define ADC_CHANNEL ADC2_GPIO15_CHANNEL // ADC channel for battery voltage measurement
|
||||||
|
#define BATTERY_SENSE_SAMPLES 30
|
||||||
|
#define BAT_MEASURE_ADC_UNIT 2 // Use ADC2 for battery measurement
|
||||||
|
|
||||||
|
#define USE_SSD1306
|
||||||
|
|
||||||
|
#define BUTTON_PIN 0 // Button pin for this board
|
||||||
|
#define BUTTON_PIN_ALT 36
|
||||||
|
|
||||||
|
#define HAS_NEOPIXEL // If defined, we will use the neopixel library
|
||||||
|
#define NEOPIXEL_DATA 35 // Neopixel pin for this board
|
||||||
|
#define NEOPIXEL_COUNT 1 // Number of neopixels on this board
|
||||||
|
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
|
||||||
|
|
||||||
|
#define ADC_MULTIPLIER 2
|
||||||
|
|
||||||
|
#define I2C_SDA 47 // I2C pins for this board
|
||||||
|
#define I2C_SCL 48
|
||||||
|
|
||||||
|
#define USE_SX1262
|
||||||
|
|
||||||
|
#define LORA_SCK 16
|
||||||
|
#define LORA_MISO 33
|
||||||
|
#define LORA_MOSI 34
|
||||||
|
#define LORA_CS 21
|
||||||
|
#define LORA_RESET 18
|
||||||
|
|
||||||
|
#define LORA_DIO0 12 // a No connect on the SX1262 module
|
||||||
|
#define LORA_DIO1 13
|
||||||
|
#define LORA_DIO2 14 // Not really used
|
||||||
|
|
||||||
|
#define LORA_TCXO_GPIO 17
|
||||||
|
|
||||||
|
#define TCXO_OPTIONAL
|
||||||
|
|
||||||
|
#define SX126X_CS LORA_CS
|
||||||
|
#define SX126X_DIO1 LORA_DIO1
|
||||||
|
#define SX126X_BUSY LORA_DIO2
|
||||||
|
#define SX126X_RESET LORA_RESET
|
||||||
|
#define SX126X_DIO2_AS_RF_SWITCH
|
||||||
|
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
13
variants/seeed_wio_tracker_L1/platformio.ini
Normal file
13
variants/seeed_wio_tracker_L1/platformio.ini
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[env:seeed_wio_tracker_L1]
|
||||||
|
board = seeed_wio_tracker_L1
|
||||||
|
extends = nrf52840_base
|
||||||
|
;board_level = extra
|
||||||
|
build_flags = ${nrf52840_base.build_flags}
|
||||||
|
-I $PROJECT_DIR/variants/seeed_wio_tracker_L1
|
||||||
|
-D SEEED_WIO_TRACKER_L1
|
||||||
|
-Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52
|
||||||
|
board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
|
||||||
|
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/seeed_wio_tracker_L1>
|
||||||
|
lib_deps =
|
||||||
|
${nrf52840_base.lib_deps}
|
||||||
|
debug_tool = jlink
|
96
variants/seeed_wio_tracker_L1/variant.cpp
Normal file
96
variants/seeed_wio_tracker_L1/variant.cpp
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
/*
|
||||||
|
* variant.cpp - Digital pin mapping for TRACKER L1
|
||||||
|
*
|
||||||
|
* This file defines the pin mapping array that maps logical digital pins (D0-D17)
|
||||||
|
* to physical GPIO ports/pins on the Nordic nRF52 series microcontroller.
|
||||||
|
*
|
||||||
|
* Board: [Seeed Studio WIO TRACKER L1]
|
||||||
|
* Hardware Features:
|
||||||
|
* - LoRa module (CS/SCK/MISO/MOSI control pins)
|
||||||
|
* - GNSS module (TX/RX/Reset/Wakeup)
|
||||||
|
* - User LEDs (D11-D12)
|
||||||
|
* - User button (D13)
|
||||||
|
* - Grove/NFC interface (D14-D15)
|
||||||
|
* - Battery voltage monitoring (D16)
|
||||||
|
*
|
||||||
|
* Created [20250521]
|
||||||
|
* By [Dylan]
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "variant.h"
|
||||||
|
#include "nrf.h"
|
||||||
|
#include "wiring_constants.h"
|
||||||
|
#include "wiring_digital.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Digital pin to GPIO port/pin mapping table
|
||||||
|
*
|
||||||
|
* Format: Logical Pin (Dx) -> nRF Port.Pin (Px.xx)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
const uint32_t g_ADigitalPinMap[] = {
|
||||||
|
// D0 .. D10 - Peripheral control pins
|
||||||
|
41, // D0 P1.09 GNSS_WAKEUP
|
||||||
|
7, // D1 P0.07 LORA_DIO1
|
||||||
|
39, // D2 P1,07 LORA_RESET
|
||||||
|
42, // D3 P1.10 LORA_BUSY
|
||||||
|
46, // D4 P1.14 (A4/SDA) LORA_CS
|
||||||
|
40, // D5 P1.08 (A5/SCL) LORA_SW
|
||||||
|
27, // D6 P0.27 (UART_TX) GNSS_TX
|
||||||
|
26, // D7 P0.26 (UART_RX) GNSS_RX
|
||||||
|
30, // D8 P0.30 (SPI_SCK) LORA_SCK
|
||||||
|
3, // D9 P0.3 (SPI_MISO) LORA_MISO
|
||||||
|
28, // D10 P0.28 (SPI_MOSI) LORA_MOSI
|
||||||
|
|
||||||
|
// D11-D12 - LED outputs
|
||||||
|
33, // D11 P1.1 User LED
|
||||||
|
// Buzzzer
|
||||||
|
32, // D12 P1.0 Buzzer
|
||||||
|
|
||||||
|
// D13 - User input
|
||||||
|
8, // D13 P0.08 User Button
|
||||||
|
|
||||||
|
// D14-D15 - Grove interface
|
||||||
|
6, // D14 P0.06 OLED SDA
|
||||||
|
5, // D15 P0.05 OLED SCL
|
||||||
|
|
||||||
|
// D16 - Battery voltage ADC input
|
||||||
|
31, // D16 P0.31 VBAT_ADC
|
||||||
|
// GROVE
|
||||||
|
0, // D17 P0.00 GROVESDA
|
||||||
|
1, // D18 P0.01 GROVESCL
|
||||||
|
|
||||||
|
// FLASH
|
||||||
|
21, // D19 P0.21 (QSPI_SCK)
|
||||||
|
25, // D20 P0.25 (QSPI_CSN)
|
||||||
|
20, // D21 P0.20 (QSPI_SIO_0 DI)
|
||||||
|
24, // D22 P0.24 (QSPI_SIO_1 DO)
|
||||||
|
22, // D23 P0.22 (QSPI_SIO_2 WP)
|
||||||
|
23, // D24 P0.23 (QSPI_SIO_3 HOLD)
|
||||||
|
|
||||||
|
36, // D25 TB_UP
|
||||||
|
12, // D26 TB_DOWN
|
||||||
|
11, // D27 TB_LEFT
|
||||||
|
35, // D28 TB_RIGHT
|
||||||
|
37, // D29 TB_PRESS
|
||||||
|
4, // D30 BAT_CTL
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
void initVariant()
|
||||||
|
{
|
||||||
|
pinMode(PIN_QSPI_CS, OUTPUT);
|
||||||
|
digitalWrite(PIN_QSPI_CS, HIGH);
|
||||||
|
// This setup is crucial for ensuring low power consumption and proper initialization of the hardware components.
|
||||||
|
// VBAT_ENABLE
|
||||||
|
pinMode(BAT_READ, OUTPUT);
|
||||||
|
digitalWrite(BAT_READ, HIGH);
|
||||||
|
|
||||||
|
pinMode(PIN_LED1, OUTPUT);
|
||||||
|
digitalWrite(PIN_LED1, LOW);
|
||||||
|
pinMode(PIN_LED2, OUTPUT);
|
||||||
|
digitalWrite(PIN_LED2, LOW);
|
||||||
|
pinMode(PIN_LED2, OUTPUT);
|
||||||
|
}
|
184
variants/seeed_wio_tracker_L1/variant.h
Normal file
184
variants/seeed_wio_tracker_L1/variant.h
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
#ifndef _SEEED_TRACKER_L1_H_
|
||||||
|
#define _SEEED_TRACKER_L1_H_
|
||||||
|
#include "WVariant.h"
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// Clock Configuration
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
#define VARIANT_MCK (64000000ul) // Master clock frequency
|
||||||
|
#define USE_LFXO // 32.768kHz crystal for LFCLK
|
||||||
|
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// Pin Capacity Definitions
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
#define PINS_COUNT (33u) // Total GPIO pins
|
||||||
|
#define NUM_DIGITAL_PINS (33u) // Digital I/O pins
|
||||||
|
#define NUM_ANALOG_INPUTS (8u) // Analog inputs (A0-A5 + VBAT + AREF)
|
||||||
|
#define NUM_ANALOG_OUTPUTS (0u)
|
||||||
|
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// LED Configuration
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// LEDs
|
||||||
|
// LEDs
|
||||||
|
#define PIN_LED1 (11) // LED P1.15
|
||||||
|
#define PIN_LED2 (12) //
|
||||||
|
|
||||||
|
#define LED_BUILTIN PIN_LED1
|
||||||
|
#define LED_CONN PIN_LED2
|
||||||
|
|
||||||
|
#define LED_GREEN PIN_LED1
|
||||||
|
#define LED_BLUE PIN_LED2
|
||||||
|
// #define LED_PIN PIN_LED2
|
||||||
|
#define LED_STATE_ON 1 // State when LED is litted
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// Button Configuration
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
#define BUTTON_PIN D13 // This is the Program Button
|
||||||
|
// #define BUTTON_NEED_PULLUP 1
|
||||||
|
#define BUTTON_ACTIVE_LOW true
|
||||||
|
#define BUTTON_ACTIVE_PULLUP false
|
||||||
|
|
||||||
|
#define BUTTON_PIN_TOUCH 13 // Touch button
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// Digital Pin Mapping (D0-D10)
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
#define D0 0 // P1.06 GNSS_WAKEUP/IO0
|
||||||
|
#define D1 1 // P0.07 LORA_DIO1
|
||||||
|
#define D2 2 // P1.07 LORA_RESET
|
||||||
|
#define D3 3 // P1.10 LORA_BUSY
|
||||||
|
#define D4 4 // P1.14 LORA_CS
|
||||||
|
#define D5 5 // P1.08 LORA_SW
|
||||||
|
#define D6 6 // P0.27 GNSS_TX
|
||||||
|
#define D7 7 // P0.26 GNSS_RX
|
||||||
|
#define D8 8 // P0.30 SPI_SCK
|
||||||
|
#define D9 9 // P0.03 SPI_MISO
|
||||||
|
#define D10 10 // P0.28 SPI_MOSI
|
||||||
|
#define D12 12 // P1.00 Buzzer
|
||||||
|
#define D13 13 // P0.08 User Button
|
||||||
|
#define D14 14 // P0.05 OLED SCL
|
||||||
|
#define D15 15 // P0.06 OLED SDA
|
||||||
|
#define D16 16 // P0.31 VBAT_ADC
|
||||||
|
#define D17 17 // P0.00 GROVE SDA
|
||||||
|
#define D18 18 // P0.01 GROVE_SCL
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// Analog Pin Definitions
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
#define PIN_A0 0 // P0.02 Analog Input 0
|
||||||
|
#define PIN_A1 1 // P0.03 Analog Input 1
|
||||||
|
#define PIN_A2 2 // P0.28 Analog Input 2
|
||||||
|
#define PIN_A3 3 // P0.29 Analog Input 3
|
||||||
|
#define PIN_A4 4 // P0.04 Analog Input 4
|
||||||
|
#define PIN_A5 5 // P0.05 Analog Input 5
|
||||||
|
#define PIN_VBAT D16 // P0.31 Battery voltage sense
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// Communication Interfaces
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// I2C Configuration
|
||||||
|
#define HAS_WIRE 1
|
||||||
|
#define PIN_WIRE_SDA D14 // P0.09
|
||||||
|
#define PIN_WIRE_SCL D15 // P0.10
|
||||||
|
#define WIRE_INTERFACES_COUNT 1
|
||||||
|
#define I2C_NO_RESCAN
|
||||||
|
|
||||||
|
static const uint8_t SDA = PIN_WIRE_SDA;
|
||||||
|
static const uint8_t SCL = PIN_WIRE_SCL;
|
||||||
|
|
||||||
|
#define HAS_SCREEN 1
|
||||||
|
#define USE_SSD1306 1
|
||||||
|
|
||||||
|
// SPI Configuration (SX1262)
|
||||||
|
|
||||||
|
#define SPI_INTERFACES_COUNT 1
|
||||||
|
#define PIN_SPI_MISO 9 // P0.03 (D9)
|
||||||
|
#define PIN_SPI_MOSI 10 // P0.28 (D10)
|
||||||
|
#define PIN_SPI_SCK 8 // P0.30 (D8)
|
||||||
|
|
||||||
|
// SX1262 LoRa Module Pins
|
||||||
|
#define USE_SX1262
|
||||||
|
#define SX126X_CS D4 // Chip select
|
||||||
|
#define SX126X_DIO1 D1 // Digital IO 1 (Interrupt)
|
||||||
|
#define SX126X_BUSY D3 // Busy status
|
||||||
|
#define SX126X_RESET D2 // Reset control
|
||||||
|
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // TCXO supply voltage
|
||||||
|
#define SX126X_RXEN D5 // RX enable control
|
||||||
|
#define SX126X_TXEN RADIOLIB_NC
|
||||||
|
#define SX126X_DIO2_AS_RF_SWITCH // This Line is really necessary for SX1262 to work with RF switch or will loss TX power
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// Power Management
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
|
||||||
|
#define BAT_READ 30 // D30 = P0.04 Reads battery voltage from divider on signal board.
|
||||||
|
#define BATTERY_SENSE_RESOLUTION_BITS 12
|
||||||
|
#define ADC_MULTIPLIER 2.0
|
||||||
|
#define BATTERY_PIN PIN_VBAT // PIN_A7
|
||||||
|
#define AREF_VOLTAGE 3.6
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// GPS L76KB
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
#define GPS_L76K
|
||||||
|
#ifdef GPS_L76K
|
||||||
|
#define PIN_GPS_RX D6 // P0.26
|
||||||
|
#define PIN_GPS_TX D7
|
||||||
|
#define HAS_GPS 1
|
||||||
|
#define GPS_BAUDRATE 9600
|
||||||
|
#define GPS_THREAD_INTERVAL 50
|
||||||
|
#define PIN_SERIAL1_RX PIN_GPS_TX
|
||||||
|
#define PIN_SERIAL1_TX PIN_GPS_RX
|
||||||
|
|
||||||
|
#define GPS_RX_PIN PIN_GPS_TX
|
||||||
|
#define GPS_TX_PIN PIN_GPS_RX
|
||||||
|
#define PIN_GPS_STANDBY D0
|
||||||
|
|
||||||
|
// #define GPS_DEBUG
|
||||||
|
// #define GPS_EN D18 // P1.05
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// On-board QSPI Flash
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// On-board QSPI Flash
|
||||||
|
#define PIN_QSPI_SCK (21)
|
||||||
|
#define PIN_QSPI_CS (22)
|
||||||
|
#define PIN_QSPI_IO0 (23)
|
||||||
|
#define PIN_QSPI_IO1 (24)
|
||||||
|
#define PIN_QSPI_IO2 (25)
|
||||||
|
#define PIN_QSPI_IO3 (26)
|
||||||
|
|
||||||
|
#define EXTERNAL_FLASH_DEVICES P25Q16H
|
||||||
|
#define EXTERNAL_FLASH_USE_QSPI
|
||||||
|
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// Buzzer
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// Buzzer
|
||||||
|
|
||||||
|
#define PIN_BUZZER D12 // P1.00, pwm output
|
||||||
|
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// joystick
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
|
||||||
|
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||||
|
|
||||||
|
// trackball
|
||||||
|
#define HAS_TRACKBALL 1
|
||||||
|
#define TB_UP 25
|
||||||
|
#define TB_DOWN 26
|
||||||
|
#define TB_LEFT 27
|
||||||
|
#define TB_RIGHT 28
|
||||||
|
#define TB_PRESS 29
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// Compatibility Definitions
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
// Serial port placeholders
|
||||||
|
|
||||||
|
#define PIN_SERIAL2_RX (-1)
|
||||||
|
#define PIN_SERIAL2_TX (-1)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // _SEEED_SOLAR_NODE_H_
|
Loading…
Reference in New Issue
Block a user