mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-29 14:10:53 +00:00
Compare commits
22 Commits
v1.3.48.82
...
v2.0.0.18a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18ab8749ff | ||
|
|
a1ed5cdffc | ||
|
|
5ed2a4e8bb | ||
|
|
60e95ef3bd | ||
|
|
5b648be2a5 | ||
|
|
0149171e1a | ||
|
|
b24caa1e06 | ||
|
|
afafb3ba32 | ||
|
|
311835a231 | ||
|
|
1f9db0a8fe | ||
|
|
d6c9327aef | ||
|
|
0091863888 | ||
|
|
051ce5e09f | ||
|
|
6146b773cf | ||
|
|
8a4341fec4 | ||
|
|
154b7d256c | ||
|
|
548b0d0b53 | ||
|
|
e59361425f | ||
|
|
713e0f4260 | ||
|
|
8a1bf8cd86 | ||
|
|
f474953b51 | ||
|
|
d5ded53f05 |
25
.github/workflows/main_matrix.yml
vendored
25
.github/workflows/main_matrix.yml
vendored
@@ -33,6 +33,7 @@ jobs:
|
||||
- board: heltec-v2.1
|
||||
- board: tbeam0.7
|
||||
- board: meshtastic-diy-v1
|
||||
- board: meshtastic-dr-dev
|
||||
- board: rak4631
|
||||
- board: rak4631_eink
|
||||
- board: t-echo
|
||||
@@ -42,7 +43,7 @@ jobs:
|
||||
- board: m5stack-coreink
|
||||
- board: tbeam-s3-core
|
||||
# - board: pico
|
||||
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -96,6 +97,7 @@ jobs:
|
||||
- board: heltec-v2.1
|
||||
- board: tbeam0.7
|
||||
- board: meshtastic-diy-v1
|
||||
- board: meshtastic-dr-dev
|
||||
- board: nano-g1
|
||||
- board: station-g1
|
||||
- board: m5stack-core
|
||||
@@ -131,11 +133,11 @@ jobs:
|
||||
- name: Upgrade platformio
|
||||
run: |
|
||||
pio upgrade
|
||||
|
||||
|
||||
- name: Pull web ui
|
||||
uses: dsaltares/fetch-gh-release-asset@master
|
||||
with:
|
||||
repo: "meshtastic/meshtastic-web"
|
||||
repo: "meshtastic/web"
|
||||
file: "build.tar"
|
||||
target: "build.tar"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -147,7 +149,7 @@ jobs:
|
||||
|
||||
- name: Build ESP32
|
||||
run: bin/build-esp32.sh ${{ matrix.board }}
|
||||
|
||||
|
||||
- name: Pull OTA Firmware
|
||||
uses: dsaltares/fetch-gh-release-asset@master
|
||||
with:
|
||||
@@ -155,7 +157,7 @@ jobs:
|
||||
file: "firmware.bin"
|
||||
target: "release/bleota.bin"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
- name: Get release version string
|
||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||
id: version
|
||||
@@ -369,7 +371,7 @@ jobs:
|
||||
id: version
|
||||
|
||||
- name: Move files up
|
||||
run: mv -b -t ./ ./*tbeam-1*/littlefs*.bin ./*tbeam-1*/bleota.bin ./**/firmware*.bin ./*t-echo*/Meshtastic_nRF52_factory_erase.uf2 ./**/firmware-*.uf2 ./**/firmware-*-ota.zip ./**/*.elf ./**/meshtasticd_linux_amd64 ./*native*/*device-*.sh ./*native*/*device-*.bat
|
||||
run: mv -b -t ./ ./*tbeam-2*/littlefs*.bin ./*tbeam-2*/bleota.bin ./**/firmware*.bin ./*t-echo*/Meshtastic_nRF52_factory_erase.uf2 ./**/firmware-*.uf2 ./**/firmware-*-ota.zip ./**/*.elf ./**/meshtasticd_linux_amd64 ./*native*/*device-*.sh ./*native*/*device-*.bat
|
||||
|
||||
- name: Repackage in single firmware zip
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -392,7 +394,7 @@ jobs:
|
||||
# For diagnostics
|
||||
- name: Show artifacts
|
||||
run: ls -lR
|
||||
|
||||
|
||||
- name: Device scripts permissions
|
||||
run: |
|
||||
chmod +x ./output/device-install.sh
|
||||
@@ -427,7 +429,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
@@ -441,7 +443,7 @@ jobs:
|
||||
with:
|
||||
name: firmware-${{ steps.version.outputs.version }}
|
||||
path: ./output
|
||||
|
||||
|
||||
- name: Device scripts permissions
|
||||
run: |
|
||||
chmod +x ./output/device-install.sh
|
||||
@@ -454,7 +456,7 @@ jobs:
|
||||
with:
|
||||
name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
||||
path: ./elfs
|
||||
|
||||
|
||||
- name: Zip Elfs
|
||||
run: zip -j -r ./debug-elfs-${{ steps.version.outputs.version }}.zip ./elfs
|
||||
|
||||
@@ -498,10 +500,9 @@ jobs:
|
||||
- name: Bump version.properties
|
||||
run: >-
|
||||
bin/bump_version.py
|
||||
|
||||
|
||||
- name: Create version.properties pull request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
add-paths: |
|
||||
version.properties
|
||||
|
||||
|
||||
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
||||
[submodule "protobufs"]
|
||||
path = protobufs
|
||||
url = https://github.com/meshtastic/Meshtastic-protobufs.git
|
||||
url = https://github.com/meshtastic/protobufs.git
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Meshtastic Firmware
|
||||
|
||||

|
||||
[](https://github.com/meshtastic/repo/actions/workflows/main_matrix.yml)
|
||||
[](https://cla-assistant.io/meshtastic/Meshtastic-device)
|
||||

|
||||
[](https://github.com/meshtastic/firmware/actions/workflows/main_matrix.yml)
|
||||
[](https://cla-assistant.io/meshtastic/firmware)
|
||||
[](https://opencollective.com/meshtastic/)
|
||||
[](https://vercel.com?utm_source=meshtastic&utm_campaign=oss)
|
||||
|
||||
@@ -10,10 +10,9 @@
|
||||
|
||||
This repository contains the device firmware for the Meshtastic project.
|
||||
|
||||
|
||||
**[Building Instructions](https://meshtastic.org/docs/developers/Firmware/build)**
|
||||
**[Flashing Instructions](https://meshtastic.org/docs/getting-started/flashing-firmware/)**
|
||||
|
||||
## Stats
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -9,9 +9,6 @@ VERSION=`bin/buildinfo.py long`
|
||||
# Must have a V prefix to trigger github
|
||||
git tag "v${VERSION}"
|
||||
|
||||
# Commented out per https://github.com/meshtastic/Meshtastic-device/issues/947
|
||||
#git push root "v${VERSION}" # push the tag
|
||||
|
||||
git push origin "v${VERSION}" # push the tag
|
||||
|
||||
echo "Tag ${VERSION} pushed to github, github actions should now be building the draft release. If it seems good, click to publish it"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set -e
|
||||
|
||||
echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.6 to be located in the"
|
||||
echo "meshtastic-device root directory if the following step fails, you should download the correct"
|
||||
echo "firmware root directory if the following step fails, you should download the correct"
|
||||
echo "prebuilt binaries for your computer into nanopb-0.4.6"
|
||||
|
||||
# the nanopb tool seems to require that the .options file be in the current directory!
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
;default_envs = pca10059_diy_eink
|
||||
;default_envs = meshtastic-diy-v1
|
||||
;default_envs = meshtastic-diy-v1.1
|
||||
;default_envs = meshtastic-dr-dev
|
||||
;default_envs = m5stack-coreink
|
||||
;default_envs = rak4631
|
||||
|
||||
|
||||
Submodule protobufs updated: a79e3aef81...ed9f2499d6
@@ -159,7 +159,7 @@ class ButtonThread : public concurrency::OSThread
|
||||
|
||||
static void userButtonDoublePressed()
|
||||
{
|
||||
#if defined(USE_EINK)
|
||||
#if defined(USE_EINK) && defined(PIN_EINK_EN)
|
||||
digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -233,11 +233,14 @@ bool Power::setup()
|
||||
|
||||
void Power::shutdown()
|
||||
{
|
||||
|
||||
screen->setOn(false);
|
||||
#if defined(USE_EINK) && defined(PIN_EINK_EN)
|
||||
digitalWrite(PIN_EINK_EN, LOW); //power off backlight first
|
||||
#endif
|
||||
|
||||
#ifdef HAS_PMU
|
||||
DEBUG_MSG("Shutting down\n");
|
||||
if(PMU){
|
||||
if(PMU) {
|
||||
PMU->setChargingLedMode(XPOWERS_CHG_LED_OFF);
|
||||
PMU->shutdown();
|
||||
}
|
||||
@@ -312,7 +315,7 @@ int32_t Power::runOnce()
|
||||
#ifdef HAS_PMU
|
||||
// WE no longer use the IRQ line to wake the CPU (due to false wakes from sleep), but we do poll
|
||||
// the IRQ status by reading the registers over I2C
|
||||
if(PMU){
|
||||
if(PMU) {
|
||||
|
||||
PMU->getIrqStatus();
|
||||
|
||||
@@ -341,10 +344,11 @@ int32_t Power::runOnce()
|
||||
if (PMU->isBatRemoveIrq()) {
|
||||
DEBUG_MSG("Battery removed\n");
|
||||
}
|
||||
if (PMU->isPekeyShortPressIrq()) {
|
||||
DEBUG_MSG("PEK short button press\n");
|
||||
}
|
||||
*/
|
||||
if (PMU->isPekeyLongPressIrq()) {
|
||||
DEBUG_MSG("PEK long button press\n");
|
||||
screen->setOn(false);
|
||||
}
|
||||
|
||||
PMU->clearIrqStatus();
|
||||
}
|
||||
@@ -451,7 +455,6 @@ bool Power::axpChipInit()
|
||||
// Set constant current charging current
|
||||
PMU->setChargerConstantCurr(XPOWERS_AXP192_CHG_CUR_450MA);
|
||||
|
||||
|
||||
} else if (PMU->getChipModel() == XPOWERS_AXP2101) {
|
||||
|
||||
// t-beam s3 core
|
||||
|
||||
@@ -337,7 +337,7 @@ void PowerFSM_setup()
|
||||
#ifdef ARCH_ESP32
|
||||
// We never enter light-sleep or NB states on NRF52 (because the CPU uses so little power normally)
|
||||
|
||||
// See: https://github.com/meshtastic/Meshtastic-device/issues/1071
|
||||
// See: https://github.com/meshtastic/firmware/issues/1071
|
||||
if (isRouter || config.power.is_power_saving) {
|
||||
powerFSM.add_timed_transition(&stateNB, &stateLS, getConfiguredOrDefaultMs(config.power.min_wake_secs, default_min_wake_secs), NULL, "Min wake timeout");
|
||||
powerFSM.add_timed_transition(&stateDARK, &stateLS, getConfiguredOrDefaultMs(config.power.wait_bluetooth_secs, default_wait_bluetooth_secs), NULL, "Bluetooth timeout");
|
||||
|
||||
@@ -143,7 +143,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define HAS_WIFI 0
|
||||
#endif
|
||||
#ifndef HAS_ETHERNET
|
||||
#define ETHERNET 0
|
||||
#define HAS_ETHERNET 0
|
||||
#endif
|
||||
#ifndef HAS_SCREEN
|
||||
#define HAS_SCREEN 0
|
||||
@@ -166,6 +166,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifndef HAS_RTC
|
||||
#define HAS_RTC 0
|
||||
#endif
|
||||
#ifndef HAS_CPU_SHUTDOWN
|
||||
#define HAS_CPU_SHUTDOWN 0
|
||||
#endif
|
||||
#ifndef HAS_BLUETOOTH
|
||||
#define HAS_BLUETOOTH 0
|
||||
#endif
|
||||
|
||||
#include "RF95Configuration.h"
|
||||
#include "DebugConfiguration.h"
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
#define TECHO_DISPLAY_MODEL GxEPD2_154_D67
|
||||
#elif defined(RAK4630)
|
||||
|
||||
//GxEPD2_213_B74 - RAK14000 2.13 inch b/w 250x128
|
||||
#define TECHO_DISPLAY_MODEL GxEPD2_213_B74
|
||||
//GxEPD2_213_BN - RAK14000 2.13 inch b/w 250x122 - changed from GxEPD2_213_B74 - which was not going to give partial update support
|
||||
#define TECHO_DISPLAY_MODEL GxEPD2_213_BN
|
||||
|
||||
//4.2 inch 300x400 - GxEPD2_420_M01
|
||||
//#define TECHO_DISPLAY_MODEL GxEPD2_420_M01
|
||||
@@ -46,9 +46,9 @@ EInkDisplay::EInkDisplay(uint8_t address, int sda, int scl)
|
||||
setGeometry(GEOMETRY_RAWMODE, TECHO_DISPLAY_MODEL::WIDTH, TECHO_DISPLAY_MODEL::HEIGHT);
|
||||
#elif defined(RAK4630)
|
||||
|
||||
//GxEPD2_213_B74 - RAK14000 2.13 inch b/w 250x128
|
||||
//GxEPD2_213_BN - RAK14000 2.13 inch b/w 250x122
|
||||
setGeometry(GEOMETRY_RAWMODE, 250, 122);
|
||||
|
||||
|
||||
//GxEPD2_420_M01
|
||||
//setGeometry(GEOMETRY_RAWMODE, 300, 400);
|
||||
|
||||
@@ -110,14 +110,17 @@ bool EInkDisplay::forceDisplay(uint32_t msecLimit)
|
||||
adafruitDisplay->display(false); // FIXME, use partial update mode
|
||||
#elif defined(RAK4630)
|
||||
|
||||
//RAK14000 2.13 inch b/w 250x122 does not support partial updates
|
||||
adafruitDisplay->display(false); // FIXME, use partial update mode
|
||||
//RAK14000 2.13 inch b/w 250x122 actually now does support partial updates
|
||||
|
||||
//Full update mode (slow)
|
||||
//adafruitDisplay->display(false); // FIXME, use partial update mode
|
||||
|
||||
//Only enable for e-Paper with support for partial updates and comment out above adafruitDisplay->display(false);
|
||||
// 1.54 inch 200x200 - GxEPD2_154_M09
|
||||
// 2.13 inch 250x122 - GxEPD2_213_BN
|
||||
// 2.9 inch 296x128 - GxEPD2_290_T5D
|
||||
// 4.2 inch 300x400 - GxEPD2_420_M01
|
||||
//adafruitDisplay->nextPage();
|
||||
adafruitDisplay->nextPage();
|
||||
|
||||
#elif defined(PCA10059) || defined(M5_COREINK)
|
||||
adafruitDisplay->nextPage();
|
||||
@@ -190,11 +193,11 @@ bool EInkDisplay::connect()
|
||||
|
||||
adafruitDisplay->init(115200, true, 10, false, SPI1, SPISettings(4000000, MSBFIRST, SPI_MODE0));
|
||||
|
||||
//RAK14000 2.13 inch b/w 250x122 does not support partial updates
|
||||
//RAK14000 2.13 inch b/w 250x122 does actually now support partial updates
|
||||
adafruitDisplay->setRotation(3);
|
||||
//For 1.54, 2.9 and 4.2
|
||||
//Partial update support for 1.54, 2.13 RAK14000 b/w , 2.9 and 4.2
|
||||
//adafruitDisplay->setRotation(1);
|
||||
//adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight);
|
||||
adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight);
|
||||
} else {
|
||||
(void)adafruitDisplay;
|
||||
}
|
||||
|
||||
@@ -131,8 +131,7 @@ class Screen : public concurrency::OSThread
|
||||
void setOn(bool on)
|
||||
{
|
||||
if (!on)
|
||||
handleSetOn(
|
||||
false); // We handle off commands immediately, because they might be called because the CPU is shutting down
|
||||
handleSetOn(false); // We handle off commands immediately, because they might be called because the CPU is shutting down
|
||||
else
|
||||
enqueueCmd(ScreenCmd{.cmd = on ? Cmd::SET_ON : Cmd::SET_OFF});
|
||||
}
|
||||
|
||||
@@ -218,9 +218,7 @@ const char *Channels::getName(size_t chIndex)
|
||||
// Per mesh.proto spec, if bandwidth is specified we must ignore modemPreset enum, we assume that in that case
|
||||
// the app fucked up and forgot to set channelSettings.name
|
||||
|
||||
if (config.lora.bandwidth != 0)
|
||||
channelName = "Custom";
|
||||
else
|
||||
if (config.lora.use_preset) {
|
||||
switch (config.lora.modem_preset) {
|
||||
case Config_LoRaConfig_ModemPreset_SHORT_SLOW:
|
||||
channelName = "ShortSlow";
|
||||
@@ -247,6 +245,10 @@ const char *Channels::getName(size_t chIndex)
|
||||
channelName = "Invalid";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
channelName = "Custom";
|
||||
}
|
||||
}
|
||||
|
||||
return channelName;
|
||||
@@ -265,7 +267,7 @@ their nodes
|
||||
*
|
||||
* This function will also need to be implemented in GUI apps that talk to the radio.
|
||||
*
|
||||
* https://github.com/meshtastic/Meshtastic-device/issues/269
|
||||
* https://github.com/meshtastic/firmware/issues/269
|
||||
*/
|
||||
const char *Channels::getPrimaryName()
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ class Channels
|
||||
*
|
||||
* This function will also need to be implemented in GUI apps that talk to the radio.
|
||||
*
|
||||
* https://github.com/meshtastic/Meshtastic-device/issues/269
|
||||
* https://github.com/meshtastic/firmware/issues/269
|
||||
*/
|
||||
const char *getPrimaryName();
|
||||
|
||||
|
||||
@@ -16,6 +16,14 @@ typedef struct _DeviceMetadata {
|
||||
char firmware_version[18];
|
||||
/* Device state version */
|
||||
uint32_t device_state_version;
|
||||
/* Indicates whether the device can shutdown CPU natively or via power management chip */
|
||||
bool canShutdown;
|
||||
/* Indicates that the device has native wifi capability */
|
||||
bool hasWifi;
|
||||
/* Indicates that the device has native bluetooth capability */
|
||||
bool hasBluetooth;
|
||||
/* Indicates that the device has an ethernet peripheral */
|
||||
bool hasEthernet;
|
||||
} DeviceMetadata;
|
||||
|
||||
|
||||
@@ -24,17 +32,25 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define DeviceMetadata_init_default {"", 0}
|
||||
#define DeviceMetadata_init_zero {"", 0}
|
||||
#define DeviceMetadata_init_default {"", 0, 0, 0, 0, 0}
|
||||
#define DeviceMetadata_init_zero {"", 0, 0, 0, 0, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define DeviceMetadata_firmware_version_tag 1
|
||||
#define DeviceMetadata_device_state_version_tag 2
|
||||
#define DeviceMetadata_canShutdown_tag 3
|
||||
#define DeviceMetadata_hasWifi_tag 4
|
||||
#define DeviceMetadata_hasBluetooth_tag 5
|
||||
#define DeviceMetadata_hasEthernet_tag 6
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define DeviceMetadata_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, STRING, firmware_version, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, device_state_version, 2)
|
||||
X(a, STATIC, SINGULAR, UINT32, device_state_version, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, canShutdown, 3) \
|
||||
X(a, STATIC, SINGULAR, BOOL, hasWifi, 4) \
|
||||
X(a, STATIC, SINGULAR, BOOL, hasBluetooth, 5) \
|
||||
X(a, STATIC, SINGULAR, BOOL, hasEthernet, 6)
|
||||
#define DeviceMetadata_CALLBACK NULL
|
||||
#define DeviceMetadata_DEFAULT NULL
|
||||
|
||||
@@ -44,7 +60,7 @@ extern const pb_msgdesc_t DeviceMetadata_msg;
|
||||
#define DeviceMetadata_fields &DeviceMetadata_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define DeviceMetadata_size 25
|
||||
#define DeviceMetadata_size 33
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
||||
@@ -81,7 +81,7 @@ typedef enum _PortNum {
|
||||
PortNum_SIMULATOR_APP = 69,
|
||||
/* Private applications should use portnums >= 256.
|
||||
To simplify initial development and testing you can use "PRIVATE_APP"
|
||||
in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/Meshtastic-device/blob/master/bin/regen-protos.sh)) */
|
||||
in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/firmware/blob/master/bin/regen-protos.sh)) */
|
||||
PortNum_PRIVATE_APP = 256,
|
||||
/* ATAK Forwarder Module https://github.com/paulmandal/atak-forwarder */
|
||||
PortNum_ATAK_FORWARDER = 257,
|
||||
|
||||
@@ -58,8 +58,6 @@ char contentTypes[][2][32] = {{".txt", "text/plain"}, {".html", "text/html"}
|
||||
{".css", "text/css"}, {".ico", "image/vnd.microsoft.icon"},
|
||||
{".svg", "image/svg+xml"}, {"", ""}};
|
||||
|
||||
// const char *tarURL = "https://www.casler.org/temp/meshtastic-web.tar";
|
||||
// const char *tarURL = "https://api-production-871d.up.railway.app/mirror/webui";
|
||||
// const char *certificate = NULL; // change this as needed, leave as is for no TLS check (yolo security)
|
||||
|
||||
// Our API to handle messages to and from the radio.
|
||||
@@ -75,8 +73,8 @@ void registerHandlers(HTTPServer *insecureServer, HTTPSServer *secureServer)
|
||||
ResourceNode *nodeAPIv1ToRadio = new ResourceNode("/api/v1/toradio", "PUT", &handleAPIv1ToRadio);
|
||||
ResourceNode *nodeAPIv1FromRadio = new ResourceNode("/api/v1/fromradio", "GET", &handleAPIv1FromRadio);
|
||||
|
||||
// ResourceNode *nodeHotspotApple = new ResourceNode("/hotspot-detect.html", "GET", &handleHotspot);
|
||||
// ResourceNode *nodeHotspotAndroid = new ResourceNode("/generate_204", "GET", &handleHotspot);
|
||||
// ResourceNode *nodeHotspotApple = new ResourceNode("/hotspot-detect.html", "GET", &handleHotspot);
|
||||
// ResourceNode *nodeHotspotAndroid = new ResourceNode("/generate_204", "GET", &handleHotspot);
|
||||
|
||||
ResourceNode *nodeAdmin = new ResourceNode("/admin", "GET", &handleAdmin);
|
||||
// ResourceNode *nodeAdminSettings = new ResourceNode("/admin/settings", "GET", &handleAdminSettings);
|
||||
@@ -160,7 +158,7 @@ void handleAPIv1FromRadio(HTTPRequest *req, HTTPResponse *res)
|
||||
res->setHeader("Content-Type", "application/x-protobuf");
|
||||
res->setHeader("Access-Control-Allow-Origin", "*");
|
||||
res->setHeader("Access-Control-Allow-Methods", "GET");
|
||||
res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/Meshtastic-protobufs/master/mesh.proto");
|
||||
res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/mesh.proto");
|
||||
|
||||
uint8_t txBuf[MAX_STREAM_BUF_SIZE];
|
||||
uint32_t len = 1;
|
||||
@@ -204,7 +202,7 @@ void handleAPIv1ToRadio(HTTPRequest *req, HTTPResponse *res)
|
||||
res->setHeader("Access-Control-Allow-Headers", "Content-Type");
|
||||
res->setHeader("Access-Control-Allow-Origin", "*");
|
||||
res->setHeader("Access-Control-Allow-Methods", "PUT, OPTIONS");
|
||||
res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/Meshtastic-protobufs/master/mesh.proto");
|
||||
res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/mesh.proto");
|
||||
|
||||
if (req->getMethod() == "OPTIONS") {
|
||||
res->setStatusCode(204); // Success with no content
|
||||
@@ -266,7 +264,7 @@ std::vector<std::map<char *, char *>> *htmlListDir(std::vector<std::map<char *,
|
||||
if (levels) {
|
||||
#ifdef ARCH_ESP32
|
||||
htmlListDir(fileList, file.path(), levels - 1);
|
||||
#else
|
||||
#else
|
||||
htmlListDir(fileList, file.name(), levels - 1);
|
||||
#endif
|
||||
file.close();
|
||||
@@ -274,7 +272,7 @@ std::vector<std::map<char *, char *>> *htmlListDir(std::vector<std::map<char *,
|
||||
} else {
|
||||
std::map<char *, char *> thisFileMap;
|
||||
thisFileMap[strdup("size")] = strdup(String(file.size()).c_str());
|
||||
#ifdef ARCH_ESP32
|
||||
#ifdef ARCH_ESP32
|
||||
thisFileMap[strdup("name")] = strdup(String(file.path()).substring(1).c_str());
|
||||
#else
|
||||
thisFileMap[strdup("name")] = strdup(String(file.name()).substring(1).c_str());
|
||||
|
||||
@@ -441,6 +441,10 @@ void AdminModule::handleGetDeviceMetadata(const MeshPacket &req) {
|
||||
DeviceMetadata deviceMetadata;
|
||||
strncpy(deviceMetadata.firmware_version, myNodeInfo.firmware_version, 18);
|
||||
deviceMetadata.device_state_version = DEVICESTATE_CUR_VER;
|
||||
deviceMetadata.canShutdown = pmu_found || HAS_CPU_SHUTDOWN;
|
||||
deviceMetadata.hasBluetooth = HAS_BLUETOOTH;
|
||||
deviceMetadata.hasWifi = HAS_WIFI;
|
||||
deviceMetadata.hasEthernet = HAS_ETHERNET;
|
||||
|
||||
r.get_device_metadata_response = deviceMetadata;
|
||||
r.which_payload_variant = AdminMessage_get_device_metadata_response_tag;
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
/*
|
||||
|
||||
Documentation:
|
||||
https://github.com/meshtastic/Meshtastic-device/blob/master/docs/software/modules/ExternalNotificationModule.md
|
||||
https://github.com/meshtastic/firmware/blob/master/docs/software/modules/ExternalNotificationModule.md
|
||||
|
||||
This module supports:
|
||||
https://github.com/meshtastic/Meshtastic-device/issues/654
|
||||
https://github.com/meshtastic/firmware/issues/654
|
||||
|
||||
|
||||
Quick reference:
|
||||
|
||||
@@ -80,6 +80,8 @@
|
||||
#define HW_VENDOR HardwareModel_M5STACK
|
||||
#elif defined(STATION_G1)
|
||||
#define HW_VENDOR HardwareModel_STATION_G1
|
||||
#elif defined(DR_DEV)
|
||||
#define HW_VENDOR HardwareModel_DR_DEV
|
||||
#endif
|
||||
|
||||
//
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
#ifndef HAS_RADIO
|
||||
#define HAS_RADIO 1
|
||||
#endif
|
||||
#ifdef HAS_CPU_SHUTDOWN
|
||||
#define HAS_CPU_SHUTDOWN 1
|
||||
#endif
|
||||
|
||||
//
|
||||
// set HW_VENDOR
|
||||
|
||||
@@ -17,7 +17,7 @@ void powerCommandsCheck()
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(ARCH_NRF52)
|
||||
#if defined(ARCH_NRF52) || defined(HAS_PMU)
|
||||
if (shutdownAtMsec) {
|
||||
screen->startShutdownScreen();
|
||||
playBeep();
|
||||
|
||||
69
variants/diy/dr-dev/variant.h
Normal file
69
variants/diy/dr-dev/variant.h
Normal file
@@ -0,0 +1,69 @@
|
||||
// For OLED LCD
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
// GPS
|
||||
#undef GPS_RX_PIN
|
||||
#define GPS_RX_PIN NOT_A_PIN
|
||||
#undef WANT_GPS
|
||||
|
||||
#define BUTTON_PIN 2 // The middle button GPIO on the T-Beam
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).
|
||||
|
||||
#define LORA_DIO0 -1 // a No connect on the SX1262/SX1268 module
|
||||
#define LORA_RESET -1 // RST for SX1276, and for SX1262/SX1268
|
||||
#define LORA_DIO1 27 // IRQ for SX1262/SX1268 (IO26 FOR 22S)
|
||||
#define LORA_DIO2 NOT_A_PIN // BUSY for SX1262/SX1268
|
||||
#define LORA_DIO3 // Not connected on PCB, but internally on the SX1262/SX1268, if DIO3 is high the TXCO is enabled
|
||||
|
||||
// In transmitting, set TXEN as high communication level,RXEN pin is low level;
|
||||
// In receiving, set RXEN as high communication level, TXEN is lowlevel;
|
||||
// Before powering off, set TXEN、RXEN as low level.
|
||||
#define LORA_RXEN 17 // Input - RF switch RX control, connecting external MCU IO, valid in high level
|
||||
#define LORA_TXEN -1 // Input - RF switch TX control, connecting external MCU IO or DIO2, valid in high level
|
||||
/* --PINS FOR THE 900M22S
|
||||
#undef RF95_SCK
|
||||
#define RF95_SCK 18
|
||||
#undef RF95_MISO
|
||||
#define RF95_MISO 19
|
||||
#undef RF95_MOSI
|
||||
#define RF95_MOSI 23
|
||||
#undef RF95_NSS
|
||||
#define RF95_NSS 16
|
||||
*/
|
||||
|
||||
// PINS FOR THE 900M30S
|
||||
#undef RF95_SCK
|
||||
#define RF95_SCK 18
|
||||
#undef RF95_MISO
|
||||
#define RF95_MISO 19
|
||||
#undef RF95_MOSI
|
||||
#define RF95_MOSI 23
|
||||
#undef RF95_NSS
|
||||
#define RF95_NSS 33
|
||||
|
||||
// RX/TX for RFM95/SX127x
|
||||
#define RF95_RXEN LORA_RXEN
|
||||
#define RF95_TXEN LORA_TXEN
|
||||
// #define RF95_TCXO <GPIO#>
|
||||
|
||||
// common pinouts for SX126X modules
|
||||
#define SX126X_CS 33
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY 35
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_RXEN LORA_RXEN
|
||||
#define SX126X_TXEN LORA_TXEN
|
||||
|
||||
// supported modules list
|
||||
#define USE_RF95 // RFM95/SX127x
|
||||
#define USE_SX1262
|
||||
#define USE_SX1268
|
||||
#define USE_LLCC68
|
||||
|
||||
#ifdef EBYTE_E22
|
||||
// Internally the TTGO module hooks the SX126x-DIO2 in to control the TX/RX switch
|
||||
// (which is the default for the sx1262interface code)
|
||||
#define SX126X_E22
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
[VERSION]
|
||||
major = 1
|
||||
minor = 3
|
||||
build = 48
|
||||
major = 2
|
||||
minor = 0
|
||||
build = 0
|
||||
|
||||
Reference in New Issue
Block a user