mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-09 22:52:07 +00:00
Merge remote-tracking branch 'root/master' into dev1.2
# Conflicts: # proto
This commit is contained in:
commit
90576f44d8
@ -4,7 +4,7 @@ set -e
|
|||||||
|
|
||||||
VERSION=`bin/buildinfo.py`
|
VERSION=`bin/buildinfo.py`
|
||||||
|
|
||||||
BOARDS_ESP32="tlora-v2 tlora-v1 tlora-v2-1-1.6 tbeam heltec tbeam0.7"
|
BOARDS_ESP32="tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec tbeam0.7"
|
||||||
#BOARDS_ESP32=tbeam
|
#BOARDS_ESP32=tbeam
|
||||||
|
|
||||||
# FIXME note nrf52840dk build is for some reason only generating a BIN file but not a HEX file nrf52840dk-geeksville is fine
|
# FIXME note nrf52840dk build is for some reason only generating a BIN file but not a HEX file nrf52840dk-geeksville is fine
|
||||||
|
38
bin/build-nightly.sh
Executable file
38
bin/build-nightly.sh
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
# Meshtastic Nightly Build Script.
|
||||||
|
# McHamster (jm@casler.org)
|
||||||
|
#
|
||||||
|
# This is the script that is used for the nightly build server.
|
||||||
|
#
|
||||||
|
# It's probably not useful for most people, but you may want to run your own
|
||||||
|
# nightly builds.
|
||||||
|
#
|
||||||
|
# The last line of ~/.bashrc contains an inclusion of platformio in the path.
|
||||||
|
# Without this, the build script won't run from the crontab:
|
||||||
|
#
|
||||||
|
# export PATH="$HOME/.platformio/penv/bin:$PATH"
|
||||||
|
#
|
||||||
|
# The crontab contains:
|
||||||
|
# 0 2 * * * cd ~/meshtastic/github/meshtastic && source "~/.bashrc"; ./build-nightly.sh > ~/cronout.txt 2> ~/cronout.txt
|
||||||
|
|
||||||
|
cd Meshtastic-device
|
||||||
|
|
||||||
|
git pull
|
||||||
|
|
||||||
|
bin/build-all.sh
|
||||||
|
|
||||||
|
date_stamp=$(date +'%Y-%m-%d')
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# TODO: Archive the same binaries used by the build-all script.
|
||||||
|
#zip -r meshtastic_device_nightly_${date_stamp} Meshtastic-device/release/latest/bins
|
||||||
|
cp Meshtastic-device/release/archive/`ls -t ./Meshtastic-device/release/archive/| head -1` meshtastic_device_nightly_${date_stamp}.zip
|
||||||
|
|
||||||
|
# Copy the file to the webserver
|
||||||
|
scp meshtastic_device_nightly_${date_stamp}.zip jm@10.11.12.20:/volume1/web/meshtastic/nightly_builds/
|
||||||
|
|
||||||
|
# Delete the local copy
|
||||||
|
rm meshtastic_device_nightly_${date_stamp}.zip
|
@ -1,21 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
PYTHON=${PYTHON:-python}
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Usage info
|
# Usage info
|
||||||
show_help() {
|
show_help() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
Usage: ${0##*/} [-h] [-p ESPTOOL_PORT] [-f FILENAME]
|
Usage: ${0##*/} [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME]
|
||||||
Flash image file to device, but first erasing and writing system information"
|
Flash image file to device, but first erasing and writing system information"
|
||||||
|
|
||||||
-h Display this help and exit
|
-h Display this help and exit
|
||||||
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
||||||
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
||||||
|
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
while getopts ":h:p:f:" opt; do
|
while getopts ":hp:P:f:" opt; do
|
||||||
case "${opt}" in
|
case "${opt}" in
|
||||||
h)
|
h)
|
||||||
show_help
|
show_help
|
||||||
@ -23,6 +26,8 @@ while getopts ":h:p:f:" opt; do
|
|||||||
;;
|
;;
|
||||||
p) export ESPTOOL_PORT=${OPTARG}
|
p) export ESPTOOL_PORT=${OPTARG}
|
||||||
;;
|
;;
|
||||||
|
P) PYTHON=${OPTARG}
|
||||||
|
;;
|
||||||
f) FILENAME=${OPTARG}
|
f) FILENAME=${OPTARG}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -36,10 +41,10 @@ shift "$((OPTIND-1))"
|
|||||||
|
|
||||||
if [ -f "${FILENAME}" ]; then
|
if [ -f "${FILENAME}" ]; then
|
||||||
echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
|
echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
|
||||||
esptool.py --baud 921600 erase_flash
|
$PYTHON -m esptool --baud 921600 erase_flash
|
||||||
esptool.py --baud 921600 write_flash 0x1000 system-info.bin
|
$PYTHON -m esptool --baud 921600 write_flash 0x1000 system-info.bin
|
||||||
esptool.py --baud 921600 write_flash 0x00390000 spiffs-*.bin
|
$PYTHON -m esptool --baud 921600 write_flash 0x00390000 spiffs-*.bin
|
||||||
esptool.py --baud 921600 write_flash 0x10000 ${FILENAME}
|
$PYTHON -m esptool --baud 921600 write_flash 0x10000 ${FILENAME}
|
||||||
else
|
else
|
||||||
echo "Invalid file: ${FILENAME}"
|
echo "Invalid file: ${FILENAME}"
|
||||||
show_help
|
show_help
|
||||||
|
@ -1,19 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
PYTHON=${PYTHON:-python}
|
||||||
|
|
||||||
# Usage info
|
# Usage info
|
||||||
show_help() {
|
show_help() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
Usage: ${0##*/} [-h] [-p ESPTOOL_PORT] -f FILENAME
|
Usage: ${0##*/} [-h] [-p ESPTOOL_PORT] [-P PYTHON] -f FILENAME
|
||||||
Flash image file to device, leave existing system intact."
|
Flash image file to device, leave existing system intact."
|
||||||
|
|
||||||
-h Display this help and exit
|
-h Display this help and exit
|
||||||
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
||||||
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
||||||
|
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
while getopts ":h:p:f:" opt; do
|
while getopts ":hp:P:f:" opt; do
|
||||||
case "${opt}" in
|
case "${opt}" in
|
||||||
h)
|
h)
|
||||||
show_help
|
show_help
|
||||||
@ -21,6 +24,8 @@ while getopts ":h:p:f:" opt; do
|
|||||||
;;
|
;;
|
||||||
p) export ESPTOOL_PORT=${OPTARG}
|
p) export ESPTOOL_PORT=${OPTARG}
|
||||||
;;
|
;;
|
||||||
|
P) PYTHON=${OPTARG}
|
||||||
|
;;
|
||||||
f) FILENAME=${OPTARG}
|
f) FILENAME=${OPTARG}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -34,9 +39,9 @@ shift "$((OPTIND-1))"
|
|||||||
|
|
||||||
if [ -f "${FILENAME}" ]; then
|
if [ -f "${FILENAME}" ]; then
|
||||||
echo "Trying to flash update ${FILENAME}."
|
echo "Trying to flash update ${FILENAME}."
|
||||||
esptool.py --baud 921600 write_flash 0x10000 ${FILENAME}
|
$PYTHON -m esptool --baud 921600 write_flash 0x10000 ${FILENAME}
|
||||||
echo "Erasing the otadata partition, which will turn off flash flippy-flop and force the first image to be used"
|
echo "Erasing the otadata partition, which will turn off flash flippy-flop and force the first image to be used"
|
||||||
esptool.py --baud 921600 erase_region 0xe000 0x2000
|
$PYTHON -m esptool --baud 921600 erase_region 0xe000 0x2000
|
||||||
else
|
else
|
||||||
echo "Invalid file: ${FILENAME}"
|
echo "Invalid file: ${FILENAME}"
|
||||||
show_help
|
show_help
|
||||||
|
@ -63,6 +63,36 @@ Be sure to turn off either the plugin configured as a sender or the device where
|
|||||||
|
|
||||||
Also be mindful of your space usage on the file system. It has protections from filling up the space but it's best to delete old range test results.
|
Also be mindful of your space usage on the file system. It has protections from filling up the space but it's best to delete old range test results.
|
||||||
|
|
||||||
|
# Application Examples
|
||||||
|
|
||||||
|
## Google Integration
|
||||||
|
|
||||||
|
@jfirwin on our forum [meshtastic.discourse.org](https://meshtastic.discourse.group/t/new-plugin-rangetestplugin/2591/49?u=mc-hamster) shared how to integrate the resulting csv file with Google Products.
|
||||||
|
|
||||||
|
### Earth
|
||||||
|
|
||||||
|
Steps:
|
||||||
|
|
||||||
|
1. [Download](https://www.google.com/earth/versions/#download-pro) 1 and open Google Earth
|
||||||
|
1. Select File > Import
|
||||||
|
2. Select CSV
|
||||||
|
3. Select Delimited, Comma
|
||||||
|
4. Make sure the button that states “This dataset does not contain latitude/longitude information, but street addresses” is unchecked
|
||||||
|
5. Select “rx lat” & “rx long” for the appropriate lat/lng fields
|
||||||
|
6. Click finish
|
||||||
|
2. When it prompts you to create a style template, click yes.
|
||||||
|
1. Set the name field to whichever column you want to be displayed on the map (don’t worry about this too much, when you click on an icon, all the relavant data appears)
|
||||||
|
2. select a color, icon, etc. and hit ok.
|
||||||
|
|
||||||
|
Your data will load onto the map, make sure to click the checkbox next to your dataset in the sidebar to view it.
|
||||||
|
|
||||||
|
### My Maps
|
||||||
|
|
||||||
|
You can use [My Maps](http://mymaps.google.com/). It takes CSVs and the whole interface is much easier to work with.
|
||||||
|
|
||||||
|
Google has instructions on how to do that [here](https://support.google.com/mymaps/answer/3024836?co=GENIE.Platform%3DDesktop&hl=en#zippy=%2Cstep-prepare-your-info%2Cstep-import-info-into-the-map).
|
||||||
|
|
||||||
|
You can style the ranges differently based on the values, so you can have the pins be darker the if the SNR or RSSI (if that gets added) is higher.
|
||||||
|
|
||||||
# Known Problems
|
# Known Problems
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ default_envs = tbeam
|
|||||||
;default_envs = tbeam0.7
|
;default_envs = tbeam0.7
|
||||||
;default_envs = heltec
|
;default_envs = heltec
|
||||||
;default_envs = tlora-v1
|
;default_envs = tlora-v1
|
||||||
|
;default_envs = tlora_v1_3
|
||||||
;default_envs = tlora-v2
|
;default_envs = tlora-v2
|
||||||
;default_envs = lora-relay-v1 # nrf board
|
;default_envs = lora-relay-v1 # nrf board
|
||||||
;default_envs = eink
|
;default_envs = eink
|
||||||
@ -158,6 +159,12 @@ build_flags =
|
|||||||
${esp32_base.build_flags} -D TLORA_V1
|
${esp32_base.build_flags} -D TLORA_V1
|
||||||
|
|
||||||
; note: the platformio definition for lora32-v2 seems stale, it is missing a pins_arduino.h file, therefore I don't think it works
|
; note: the platformio definition for lora32-v2 seems stale, it is missing a pins_arduino.h file, therefore I don't think it works
|
||||||
|
[env:tlora_v1_3]
|
||||||
|
extends = esp32_base
|
||||||
|
board = ttgo-lora32-v1
|
||||||
|
build_flags =
|
||||||
|
${esp32_base.build_flags} -D TLORA_V1_3
|
||||||
|
|
||||||
[env:tlora-v2]
|
[env:tlora-v2]
|
||||||
extends = esp32_base
|
extends = esp32_base
|
||||||
board = ttgo-lora32-v1
|
board = ttgo-lora32-v1
|
||||||
|
@ -47,8 +47,7 @@ class AirTime : private concurrency::OSThread
|
|||||||
void logAirtime(reportTypes reportType, uint32_t airtime_ms);
|
void logAirtime(reportTypes reportType, uint32_t airtime_ms);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual int32_t runOnce() override;
|
||||||
virtual int32_t runOnce();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern AirTime *airTime;
|
extern AirTime *airTime;
|
@ -311,7 +311,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#elif defined(TLORA_V1_3)
|
#elif defined(TLORA_V1_3)
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR HardwareModel_TLORA_V1p3
|
#define HW_VENDOR HardwareModel_TLORA_V1_1p3
|
||||||
|
|
||||||
#undef GPS_RX_PIN
|
#undef GPS_RX_PIN
|
||||||
#undef GPS_TX_PIN
|
#undef GPS_TX_PIN
|
||||||
|
@ -186,9 +186,19 @@ bool SerialPluginRadio::handleReceived(const MeshPacket &mp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// DEBUG_MSG("* * Message came from the mesh\n");
|
|
||||||
// Serial2.println("* * Message came from the mesh");
|
if (radioConfig.preferences.serialplugin_mode == 0 || radioConfig.preferences.serialplugin_mode == 1) {
|
||||||
Serial2.printf("%s", p.payload.bytes);
|
// DEBUG_MSG("* * Message came from the mesh\n");
|
||||||
|
// Serial2.println("* * Message came from the mesh");
|
||||||
|
Serial2.printf("%s", p.payload.bytes);
|
||||||
|
|
||||||
|
} else if (radioConfig.preferences.serialplugin_mode == 10) {
|
||||||
|
/*
|
||||||
|
@jobionekabnoi
|
||||||
|
Add code here to handle what gets sent out to the serial interface.
|
||||||
|
Format it the way you want.
|
||||||
|
*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -35,9 +35,9 @@ int32_t RangeTestPlugin::runOnce()
|
|||||||
without having to configure it from the PythonAPI or WebUI.
|
without having to configure it from the PythonAPI or WebUI.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//radioConfig.preferences.range_test_plugin_enabled = 1;
|
// radioConfig.preferences.range_test_plugin_enabled = 1;
|
||||||
//radioConfig.preferences.range_test_plugin_sender = 45;
|
// radioConfig.preferences.range_test_plugin_sender = 45;
|
||||||
//radioConfig.preferences.range_test_plugin_save = 1;
|
// radioConfig.preferences.range_test_plugin_save = 1;
|
||||||
|
|
||||||
// Fixed position is useful when testing indoors.
|
// Fixed position is useful when testing indoors.
|
||||||
// radioConfig.preferences.fixed_position = 1;
|
// radioConfig.preferences.fixed_position = 1;
|
||||||
@ -112,7 +112,7 @@ void RangeTestPluginRadio::sendPayload(NodeNum dest, bool wantReplies)
|
|||||||
packetSequence++;
|
packetSequence++;
|
||||||
|
|
||||||
static char heartbeatString[20];
|
static char heartbeatString[20];
|
||||||
snprintf(heartbeatString, sizeof(heartbeatString), "seq %d", packetSequence);
|
snprintf(heartbeatString, sizeof(heartbeatString), "seq %u", packetSequence);
|
||||||
|
|
||||||
p->decoded.payload.size = strlen(heartbeatString); // You must specify how many bytes are in the reply
|
p->decoded.payload.size = strlen(heartbeatString); // You must specify how many bytes are in the reply
|
||||||
memcpy(p->decoded.payload.bytes, heartbeatString, p->decoded.payload.size);
|
memcpy(p->decoded.payload.bytes, heartbeatString, p->decoded.payload.size);
|
||||||
@ -290,7 +290,7 @@ bool RangeTestPluginRadio::appendFile(const MeshPacket &mp)
|
|||||||
fileToAppend.printf("??:??:??,"); // Time
|
fileToAppend.printf("??:??:??,"); // Time
|
||||||
}
|
}
|
||||||
|
|
||||||
fileToAppend.printf("%d,", getFrom(&mp)); // From
|
fileToAppend.printf("%d,", getFrom(&mp)); // From
|
||||||
fileToAppend.printf("%s,", n->user.long_name); // Long Name
|
fileToAppend.printf("%s,", n->user.long_name); // Long Name
|
||||||
fileToAppend.printf("%f,", n->position.latitude_i * 1e-7); // Sender Lat
|
fileToAppend.printf("%f,", n->position.latitude_i * 1e-7); // Sender Lat
|
||||||
fileToAppend.printf("%f,", n->position.longitude_i * 1e-7); // Sender Long
|
fileToAppend.printf("%f,", n->position.longitude_i * 1e-7); // Sender Long
|
||||||
|
@ -231,6 +231,10 @@ bool StoreForwardPlugin::handleReceived(const MeshPacket &mp)
|
|||||||
DEBUG_MSG("Packet came from - PortNum_POSITION_APP\n");
|
DEBUG_MSG("Packet came from - PortNum_POSITION_APP\n");
|
||||||
} else if (mp.decoded.portnum == PortNum_NODEINFO_APP) {
|
} else if (mp.decoded.portnum == PortNum_NODEINFO_APP) {
|
||||||
DEBUG_MSG("Packet came from - PortNum_NODEINFO_APP\n");
|
DEBUG_MSG("Packet came from - PortNum_NODEINFO_APP\n");
|
||||||
|
} else if (mp.decoded.portnum == PortNum_ROUTING_APP) {
|
||||||
|
DEBUG_MSG("Packet came from - PortNum_ROUTING_APP\n");
|
||||||
|
} else if (mp.decoded.portnum == PortNum_ADMIN_APP) {
|
||||||
|
DEBUG_MSG("Packet came from - PortNum_ADMIN_APP\n");
|
||||||
} else if (mp.decoded.portnum == PortNum_REPLY_APP) {
|
} else if (mp.decoded.portnum == PortNum_REPLY_APP) {
|
||||||
DEBUG_MSG("Packet came from - PortNum_REPLY_APP\n");
|
DEBUG_MSG("Packet came from - PortNum_REPLY_APP\n");
|
||||||
} else if (mp.decoded.portnum == PortNum_IP_TUNNEL_APP) {
|
} else if (mp.decoded.portnum == PortNum_IP_TUNNEL_APP) {
|
||||||
@ -276,40 +280,34 @@ StoreForwardPlugin::StoreForwardPlugin()
|
|||||||
Uncomment the preferences below if you want to use the plugin
|
Uncomment the preferences below if you want to use the plugin
|
||||||
without having to configure it from the PythonAPI or WebUI.
|
without having to configure it from the PythonAPI or WebUI.
|
||||||
|
|
||||||
|
*/
|
||||||
radioConfig.preferences.store_forward_plugin_enabled = 1;
|
radioConfig.preferences.store_forward_plugin_enabled = 1;
|
||||||
radioConfig.preferences.is_router = 1;
|
radioConfig.preferences.is_router = 1;
|
||||||
*/
|
|
||||||
|
|
||||||
if (radioConfig.preferences.store_forward_plugin_enabled) {
|
if (radioConfig.preferences.store_forward_plugin_enabled) {
|
||||||
|
|
||||||
|
// Router
|
||||||
if (radioConfig.preferences.is_router) {
|
if (radioConfig.preferences.is_router) {
|
||||||
DEBUG_MSG("Initializing Store & Forward Plugin - Enabled as Router\n");
|
DEBUG_MSG("Initializing Store & Forward Plugin - Enabled as Router\n");
|
||||||
// Router
|
|
||||||
if (ESP.getPsramSize()) {
|
if (ESP.getPsramSize()) {
|
||||||
if (ESP.getFreePsram() >= 2048 * 1024) {
|
if (ESP.getFreePsram() >= 1024 * 1024) {
|
||||||
|
|
||||||
// Do the startup here
|
// Do the startup here
|
||||||
|
|
||||||
this->populatePSRAM();
|
this->populatePSRAM();
|
||||||
|
|
||||||
// packetHistory[0].bytes;
|
|
||||||
// return (10 * 1000);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
DEBUG_MSG("Device has less than 2M of PSRAM free. Aborting startup.\n");
|
DEBUG_MSG("Device has less than 1M of PSRAM free. Aborting startup.\n");
|
||||||
DEBUG_MSG("Store & Forward Plugin - Aborting Startup.\n");
|
DEBUG_MSG("Store & Forward Plugin - Aborting Startup.\n");
|
||||||
|
|
||||||
// return (INT32_MAX);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
DEBUG_MSG("Device doesn't have PSRAM.\n");
|
DEBUG_MSG("Device doesn't have PSRAM.\n");
|
||||||
DEBUG_MSG("Store & Forward Plugin - Aborting Startup.\n");
|
DEBUG_MSG("Store & Forward Plugin - Aborting Startup.\n");
|
||||||
|
|
||||||
// return (INT32_MAX);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Client
|
||||||
} else {
|
} else {
|
||||||
DEBUG_MSG("Initializing Store & Forward Plugin - Enabled as Client\n");
|
DEBUG_MSG("Initializing Store & Forward Plugin - Enabled as Client\n");
|
||||||
// return (5 * 1000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user