mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-30 13:41:53 +00:00
Compare commits
10 Commits
no-outgoin
...
fix-ota-sc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b1fa550a1 | ||
|
|
68733a6c51 | ||
|
|
22617076f8 | ||
|
|
6f5a7672b4 | ||
|
|
e08c050720 | ||
|
|
28b4f37a93 | ||
|
|
b18742c211 | ||
|
|
03084f6d3b | ||
|
|
94d7b71aa8 | ||
|
|
d44ceb6eb2 |
41
.github/workflows/models_issue_triage.yml
vendored
41
.github/workflows/models_issue_triage.yml
vendored
@@ -100,7 +100,12 @@ jobs:
|
||||
prompt: |
|
||||
Analyze this GitHub issue for completeness and determine if it needs labels.
|
||||
|
||||
If this looks like a bug on the device/firmware (crash, reboot, lockup, radio issues, GPS issues, display issues, power/sleep issues), request device logs and explain how to get them:
|
||||
IMPORTANT: Distinguish between:
|
||||
- Device/firmware bugs (crashes, reboots, lockups, radio/GPS/display/power issues) - these need device logs
|
||||
- Build/release/packaging issues (missing files, CI failures, download problems) - these do NOT need device logs
|
||||
- Documentation or website issues - these do NOT need device logs
|
||||
|
||||
If this is a device/firmware bug, request device logs and explain how to get them:
|
||||
|
||||
Web Flasher logs:
|
||||
- Go to https://flasher.meshtastic.org
|
||||
@@ -113,20 +118,18 @@ jobs:
|
||||
|
||||
Also request key context if missing: device model/variant, firmware version, region, steps to reproduce, expected vs actual.
|
||||
|
||||
Respond ONLY with JSON:
|
||||
{
|
||||
"complete": true|false,
|
||||
"comment": "Your helpful comment requesting missing info, or empty string if complete",
|
||||
"label": "needs-logs" | "needs-info" | "none"
|
||||
}
|
||||
Respond ONLY with valid JSON (no markdown, no code fences):
|
||||
{"complete": true, "comment": "", "label": "none"}
|
||||
OR
|
||||
{"complete": false, "comment": "Your helpful comment", "label": "needs-logs"}
|
||||
|
||||
Use "needs-logs" if this is a device bug AND no logs are attached.
|
||||
Use "needs-logs" ONLY if this is a device/firmware bug AND no logs are attached.
|
||||
Use "needs-info" if basic info like firmware version or steps to reproduce are missing.
|
||||
Use "none" if the issue is complete or is a feature request.
|
||||
Use "none" if the issue is complete, is a feature request, or is a build/CI/packaging issue.
|
||||
|
||||
Title: ${{ github.event.issue.title }}
|
||||
Body: ${{ github.event.issue.body }}
|
||||
system-prompt: You are a helpful assistant that triages GitHub issues. Be conservative with labels.
|
||||
system-prompt: You are a helpful assistant that triages GitHub issues. Be conservative with labels. Only request device logs for actual device/firmware bugs, not for build/release/CI issues.
|
||||
model: openai/gpt-4o-mini
|
||||
|
||||
- name: Process analysis result
|
||||
@@ -137,9 +140,12 @@ jobs:
|
||||
AI_RESPONSE: ${{ steps.analysis.outputs.response }}
|
||||
with:
|
||||
script: |
|
||||
const raw = (process.env.AI_RESPONSE || '').trim();
|
||||
let raw = (process.env.AI_RESPONSE || '').trim();
|
||||
|
||||
let complete = false;
|
||||
// Strip markdown code fences if present
|
||||
raw = raw.replace(/^```(?:json)?\s*/i, '').replace(/\s*```$/i, '').trim();
|
||||
|
||||
let complete = true;
|
||||
let comment = '';
|
||||
let label = 'none';
|
||||
|
||||
@@ -149,9 +155,10 @@ jobs:
|
||||
comment = (parsed.comment ?? '').toString().trim();
|
||||
label = (parsed.label ?? 'none').toString().trim().toLowerCase();
|
||||
} catch {
|
||||
// If JSON parse fails, treat as incomplete with raw response as comment
|
||||
complete = false;
|
||||
comment = raw;
|
||||
// If JSON parse fails, log warning and don't comment (avoid posting raw JSON)
|
||||
console.log('Failed to parse AI response as JSON:', raw);
|
||||
complete = true;
|
||||
comment = '';
|
||||
label = 'none';
|
||||
}
|
||||
|
||||
@@ -159,7 +166,9 @@ jobs:
|
||||
const allowedLabels = new Set(['needs-logs', 'needs-info', 'none']);
|
||||
if (!allowedLabels.has(label)) label = 'none';
|
||||
|
||||
core.setOutput('should_comment', (!complete && comment.length > 0) ? 'true' : 'false');
|
||||
// Only comment if we have a valid parsed comment (not raw JSON)
|
||||
const shouldComment = !complete && comment.length > 0 && !comment.startsWith('{');
|
||||
core.setOutput('should_comment', shouldComment ? 'true' : 'false');
|
||||
core.setOutput('comment_body', comment);
|
||||
core.setOutput('label', label);
|
||||
|
||||
|
||||
3
.github/workflows/models_pr_triage.yml
vendored
3
.github/workflows/models_pr_triage.yml
vendored
@@ -88,9 +88,10 @@ jobs:
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
# Step 3: Auto-label PR type (bugfix/hardware-support/enhancement)
|
||||
# Only skip for spam/ai-generated; still classify needs-review PRs
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
- name: Classify PR for labeling
|
||||
if: steps.check-labels.outputs.skip_all != 'true' && steps.check-labels.outputs.has_type_label != 'true' && (steps.quality.outputs.response == 'ok' || steps.quality.outputs.response == '')
|
||||
if: steps.check-labels.outputs.skip_all != 'true' && steps.check-labels.outputs.has_type_label != 'true' && steps.quality.outputs.response != 'spam' && steps.quality.outputs.response != 'ai-generated'
|
||||
uses: actions/ai-inference@v2
|
||||
id: classify
|
||||
continue-on-error: true
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -50,6 +50,3 @@ idf_component.yml
|
||||
CMakeLists.txt
|
||||
/sdkconfig.*
|
||||
.dummy/*
|
||||
|
||||
# PYTHONPATH used by the Nix shell
|
||||
.python3
|
||||
|
||||
@@ -156,16 +156,8 @@ IF %BPS_RESET% EQU 1 (
|
||||
SET "PROGNAME=!FILENAME:.factory.bin=!"
|
||||
CALL :LOG_MESSAGE DEBUG "Computed PROGNAME: !PROGNAME!"
|
||||
|
||||
IF "__!MCU!__" == "__esp32s3__" (
|
||||
@REM We are working with ESP32-S3
|
||||
SET "OTA_FILENAME=bleota-s3.bin"
|
||||
) ELSE IF "__!MCU!__" == "__esp32c3__" (
|
||||
@REM We are working with ESP32-C3
|
||||
SET "OTA_FILENAME=bleota-c3.bin"
|
||||
) ELSE (
|
||||
@REM Everything else
|
||||
SET "OTA_FILENAME=bleota.bin"
|
||||
)
|
||||
@REM Determine OTA filename based on MCU type (unified OTA format)
|
||||
SET "OTA_FILENAME=mt-!MCU!-ota.bin"
|
||||
CALL :LOG_MESSAGE DEBUG "Set OTA_FILENAME to: !OTA_FILENAME!"
|
||||
|
||||
@REM Set SPIFFS filename with "littlefs-" prefix.
|
||||
|
||||
@@ -131,14 +131,8 @@ if [[ -f "$FILENAME" && "$FILENAME" == *.factory.bin ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Determine OTA filename based on MCU type
|
||||
if [ "$MCU" == "esp32s3" ]; then
|
||||
OTAFILE=bleota-s3.bin
|
||||
elif [ "$MCU" == "esp32c3" ]; then
|
||||
OTAFILE=bleota-c3.bin
|
||||
else
|
||||
OTAFILE=bleota.bin
|
||||
fi
|
||||
# Determine OTA filename based on MCU type (unified OTA format)
|
||||
OTAFILE="mt-${MCU}-ota.bin"
|
||||
|
||||
# Set SPIFFS filename with "littlefs-" prefix.
|
||||
SPIFFSFILE="littlefs-${PROGNAME/firmware-/}.bin"
|
||||
|
||||
44
flake.lock
generated
44
flake.lock
generated
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1767039857,
|
||||
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||
"owner": "NixOS",
|
||||
"repo": "flake-compat",
|
||||
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1766314097,
|
||||
"narHash": "sha256-laJftWbghBehazn/zxVJ8NdENVgjccsWAdAqKXhErrM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "306ea70f9eb0fb4e040f8540e2deab32ed7e2055",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
66
flake.nix
66
flake.nix
@@ -1,66 +0,0 @@
|
||||
{
|
||||
description = "Nix flake to compile Meshtastic firmware";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
# Shim to make flake.nix work with stable Nix.
|
||||
flake-compat = {
|
||||
url = "github:NixOS/flake-compat";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs:
|
||||
let
|
||||
lib = inputs.nixpkgs.lib;
|
||||
|
||||
forAllSystems =
|
||||
fn:
|
||||
lib.genAttrs lib.systems.flakeExposed (
|
||||
system:
|
||||
fn {
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
inherit system;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
devShells = forAllSystems (
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
python3 = pkgs.python312.withPackages (
|
||||
ps: with ps; [
|
||||
google
|
||||
]
|
||||
);
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
python3
|
||||
platformio
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
# Set up PlatformIO to use a local core directory.
|
||||
export PLATFORMIO_CORE_DIR=$PWD/.platformio
|
||||
# Tell pip to put packages into $PIP_PREFIX instead of the usual
|
||||
# location. This is especially necessary under NixOS to avoid having
|
||||
# pip trying to write to the read-only Nix store. For more info,
|
||||
# see https://wiki.nixos.org/wiki/Python
|
||||
export PIP_PREFIX=$PWD/.python3
|
||||
export PYTHONPATH="$PIP_PREFIX/${python3.sitePackages}"
|
||||
export PATH="$PIP_PREFIX/bin:$PATH"
|
||||
# Avoids reproducibility issues with some Python packages
|
||||
# See https://nixos.org/manual/nixpkgs/stable/#python-setup.py-bdist_wheel-cannot-create-.whl
|
||||
unset SOURCE_DATE_EPOCH
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -120,7 +120,7 @@ lib_deps =
|
||||
[device-ui_base]
|
||||
lib_deps =
|
||||
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
||||
https://github.com/meshtastic/device-ui/archive/69739b84f87a91568d3c421498bc89977937a141.zip
|
||||
https://github.com/meshtastic/device-ui/archive/63967a4a557d33d56fc5746f9128200dde2d88c5.zip
|
||||
|
||||
; Common libs for environmental measurements in telemetry module
|
||||
[environmental_base]
|
||||
|
||||
12
shell.nix
12
shell.nix
@@ -1,12 +0,0 @@
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
nodeName = lock.nodes.root.inputs.flake-compat;
|
||||
in
|
||||
fetchTarball {
|
||||
url =
|
||||
lock.nodes.${nodeName}.locked.url
|
||||
or "https://github.com/NixOS/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.${nodeName}.locked.narHash;
|
||||
}
|
||||
) { src = ./.; }).shellNix
|
||||
@@ -816,9 +816,6 @@ void Power::shutdown()
|
||||
#endif
|
||||
#ifdef PIN_LED3
|
||||
ledOff(PIN_LED3);
|
||||
#endif
|
||||
#ifdef LED_NOTIFICATION
|
||||
ledOff(LED_NOTIFICATION);
|
||||
#endif
|
||||
doDeepSleep(DELAY_FOREVER, true, true);
|
||||
#elif defined(ARCH_PORTDUINO)
|
||||
|
||||
@@ -428,16 +428,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define HAS_RGB_LED
|
||||
#endif
|
||||
|
||||
#ifndef LED_STATE_OFF
|
||||
#define LED_STATE_OFF 0
|
||||
#endif
|
||||
#ifndef LED_STATE_ON
|
||||
#define LED_STATE_ON 1
|
||||
#endif
|
||||
#ifndef LED_STATE_OFF
|
||||
#define LED_STATE_OFF (LED_STATE_ON ^ 1)
|
||||
#endif
|
||||
|
||||
#ifndef ledOff
|
||||
#define ledOff(pin) pinMode(pin, INPUT)
|
||||
#endif
|
||||
|
||||
// default mapping of pins
|
||||
#if defined(PIN_BUTTON2) && !defined(CANCEL_BUTTON_PIN)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
SerialKeyboard *globalSerialKeyboard = nullptr;
|
||||
|
||||
#ifdef INPUTBROKER_SERIAL_TYPE
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1 // in case it's not set in the variant file
|
||||
|
||||
#if INPUTBROKER_SERIAL_TYPE == 1 // It's a Chatter
|
||||
// 3 SHIFT level (lower case, upper case, numbers), up to 4 repeated presses, button number
|
||||
|
||||
@@ -354,9 +354,9 @@ void setup()
|
||||
digitalWrite(LED_POWER, LED_STATE_ON);
|
||||
#endif
|
||||
|
||||
#ifdef LED_NOTIFICATION
|
||||
pinMode(LED_NOTIFICATION, OUTPUT);
|
||||
digitalWrite(LED_NOTIFICATION, HIGH ^ LED_STATE_ON);
|
||||
#ifdef USER_LED
|
||||
pinMode(USER_LED, OUTPUT);
|
||||
digitalWrite(USER_LED, HIGH ^ LED_STATE_ON);
|
||||
#endif
|
||||
|
||||
#ifdef WIFI_LED
|
||||
|
||||
@@ -170,7 +170,7 @@ template <typename T> bool LR11x0Interface<T>::reconfigure()
|
||||
if (err != RADIOLIB_ERR_NONE)
|
||||
RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);
|
||||
|
||||
err = lora.setCodingRate(cr, cr != 7); // use long interleaving except if CR is 4/7 which doesn't support it
|
||||
err = lora.setCodingRate(cr);
|
||||
if (err != RADIOLIB_ERR_NONE)
|
||||
RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);
|
||||
|
||||
|
||||
@@ -824,10 +824,16 @@ void NodeDB::installDefaultModuleConfig()
|
||||
moduleConfig.external_notification.output_ms = 500;
|
||||
moduleConfig.external_notification.nag_timeout = 2;
|
||||
#endif
|
||||
#if defined(LED_NOTIFICATION)
|
||||
#if defined(RAK4630) || defined(RAK11310) || defined(RAK3312) || defined(MUZI_BASE) || defined(ELECROW_ThinkNode_M3) || \
|
||||
defined(ELECROW_ThinkNode_M4) || defined(ELECROW_ThinkNode_M6)
|
||||
// Default to PIN_LED2 for external notification output (LED color depends on device variant)
|
||||
moduleConfig.external_notification.enabled = true;
|
||||
moduleConfig.external_notification.output = LED_NOTIFICATION;
|
||||
moduleConfig.external_notification.active = LED_STATE_ON;
|
||||
moduleConfig.external_notification.output = PIN_LED2;
|
||||
#if defined(MUZI_BASE) || defined(ELECROW_ThinkNode_M3)
|
||||
moduleConfig.external_notification.active = false;
|
||||
#else
|
||||
moduleConfig.external_notification.active = true;
|
||||
#endif
|
||||
moduleConfig.external_notification.alert_message = true;
|
||||
moduleConfig.external_notification.output_ms = 1000;
|
||||
moduleConfig.external_notification.nag_timeout = default_ringtone_nag_secs;
|
||||
@@ -851,6 +857,15 @@ void NodeDB::installDefaultModuleConfig()
|
||||
moduleConfig.external_notification.output_ms = 100;
|
||||
moduleConfig.external_notification.active = true;
|
||||
#endif
|
||||
#ifdef ELECROW_ThinkNode_M1
|
||||
// Default to Elecrow USER_LED (blue)
|
||||
moduleConfig.external_notification.enabled = true;
|
||||
moduleConfig.external_notification.output = USER_LED;
|
||||
moduleConfig.external_notification.active = true;
|
||||
moduleConfig.external_notification.alert_message = true;
|
||||
moduleConfig.external_notification.output_ms = 1000;
|
||||
moduleConfig.external_notification.nag_timeout = 60;
|
||||
#endif
|
||||
#ifdef T_LORA_PAGER
|
||||
moduleConfig.canned_message.updown1_enabled = true;
|
||||
moduleConfig.canned_message.inputbroker_pin_a = ROTARY_A;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "platform/portduino/USBHal.h"
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_STM32WL
|
||||
#ifdef ARCH_STM32WL>
|
||||
#include "STM32WLE5JCInterface.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -620,18 +620,15 @@ meshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p)
|
||||
!(p->pki_encrypted != true && (strcasecmp(channels.getName(chIndex), Channels::serialChannel) == 0 ||
|
||||
strcasecmp(channels.getName(chIndex), Channels::gpioChannel) == 0)) &&
|
||||
// Check for valid keys and single node destination
|
||||
config.security.private_key.size == 32 && !isBroadcast(p->to) &&
|
||||
config.security.private_key.size == 32 && !isBroadcast(p->to) && node != nullptr &&
|
||||
// Check for a known public key for the destination
|
||||
(node->user.public_key.size == 32) &&
|
||||
// Some portnums either make no sense to send with PKC
|
||||
p->decoded.portnum != meshtastic_PortNum_TRACEROUTE_APP && p->decoded.portnum != meshtastic_PortNum_NODEINFO_APP &&
|
||||
p->decoded.portnum != meshtastic_PortNum_ROUTING_APP && p->decoded.portnum != meshtastic_PortNum_POSITION_APP) {
|
||||
LOG_DEBUG("Use PKI!");
|
||||
if (numbytes + MESHTASTIC_HEADER_LENGTH + MESHTASTIC_PKC_OVERHEAD > MAX_LORA_PAYLOAD_LEN)
|
||||
return meshtastic_Routing_Error_TOO_LARGE;
|
||||
// Check for a known public key for the destination
|
||||
if (node == nullptr || node->user.public_key.size != 32) {
|
||||
LOG_WARN("Unknown public key for destination node, refusing to send legacy DM");
|
||||
return meshtastic_Routing_Error_PKI_FAILED;
|
||||
}
|
||||
if (p->pki_encrypted && !memfll(p->public_key.bytes, 0, 32) &&
|
||||
memcmp(p->public_key.bytes, node->user.public_key.bytes, 32) != 0) {
|
||||
LOG_WARN("Client public key differs from requested: 0x%02x, stored key begins 0x%02x", *p->public_key.bytes,
|
||||
|
||||
@@ -126,7 +126,7 @@ template <typename T> bool SX128xInterface<T>::reconfigure()
|
||||
if (err != RADIOLIB_ERR_NONE)
|
||||
RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);
|
||||
|
||||
err = lora.setCodingRate(cr, cr != 7); // use long interleaving except if CR is 4/7 which doesn't support it
|
||||
err = lora.setCodingRate(cr);
|
||||
if (err != RADIOLIB_ERR_NONE)
|
||||
RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);
|
||||
|
||||
|
||||
@@ -130,7 +130,8 @@ CannedMessageModule::CannedMessageModule()
|
||||
: SinglePortModule("canned", meshtastic_PortNum_TEXT_MESSAGE_APP), concurrency::OSThread("CannedMessage")
|
||||
{
|
||||
this->loadProtoForModule();
|
||||
if ((this->splitConfiguredMessages() <= 0) && (cardkb_found.address == 0x00) && !INPUTBROKER_MATRIX_TYPE) {
|
||||
if ((this->splitConfiguredMessages() <= 0) && (cardkb_found.address == 0x00) && !INPUTBROKER_MATRIX_TYPE &&
|
||||
!CANNED_MESSAGE_MODULE_ENABLE) {
|
||||
LOG_INFO("CannedMessageModule: No messages are configured. Module is disabled");
|
||||
this->runState = CANNED_MESSAGE_RUN_STATE_DISABLED;
|
||||
disable();
|
||||
|
||||
@@ -27,6 +27,10 @@ enum CannedMessageModuleIconType { shift, backspace, space, enter };
|
||||
#define CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT 50
|
||||
#define CANNED_MESSAGE_MODULE_MESSAGES_SIZE 800
|
||||
|
||||
#ifndef CANNED_MESSAGE_MODULE_ENABLE
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 0
|
||||
#endif
|
||||
|
||||
// ============================
|
||||
// Data Structures
|
||||
// ============================
|
||||
|
||||
@@ -130,6 +130,7 @@ int32_t StatusLEDModule::runOnce()
|
||||
#ifdef LED_CHARGE
|
||||
digitalWrite(LED_CHARGE, CHARGE_LED_state);
|
||||
#endif
|
||||
// digitalWrite(green_LED_PIN, LED_STATE_OFF);
|
||||
#ifdef LED_PAIRING
|
||||
digitalWrite(LED_PAIRING, PAIRING_LED_state);
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ bool RAK12035Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)
|
||||
sensor.get_sensor_version(&data);
|
||||
if (data != 0) {
|
||||
LOG_INFO("Init sensor: %s", sensorName);
|
||||
LOG_INFO("RAK12035Sensor Init Succeed \nSensor Firmware version: %i, Sensor Name: %s", data, sensorName);
|
||||
LOG_INFO("RAK12035Sensor Init Succeed \nSensor1 Firmware version: %i, Sensor Name: %s", data, sensorName);
|
||||
status = true;
|
||||
sensor.sensor_sleep();
|
||||
RESTORE_3V3_POWER();
|
||||
@@ -49,39 +49,33 @@ void RAK12035Sensor::setup()
|
||||
// TODO:: Check for and run calibration check for up to 2 additional sensors if present.
|
||||
uint16_t zero_val = 0;
|
||||
uint16_t hundred_val = 0;
|
||||
const uint16_t default_zero_val = 510;
|
||||
const uint16_t default_hundred_val = 390;
|
||||
|
||||
uint16_t default_zero_val = 550;
|
||||
uint16_t default_hundred_val = 420;
|
||||
sensor.sensor_on();
|
||||
sensor.begin();
|
||||
delay(200);
|
||||
sensor.get_dry_cal(&zero_val);
|
||||
delay(200);
|
||||
sensor.get_wet_cal(&hundred_val);
|
||||
delay(200);
|
||||
|
||||
bool calibrationReset = false;
|
||||
|
||||
if (zero_val == 0) {
|
||||
LOG_INFO("Dry calibration not set, using default: %d", default_zero_val);
|
||||
if (zero_val == 0 || zero_val <= hundred_val) {
|
||||
LOG_INFO("Dry calibration value is %d", zero_val);
|
||||
LOG_INFO("Wet calibration value is %d", hundred_val);
|
||||
LOG_INFO("This does not make sense. You can recalibrate this sensor using the calibration sketch included here: "
|
||||
"https://github.com/RAKWireless/RAK12035_SoilMoisture.");
|
||||
LOG_INFO("For now, setting default calibration value for Dry Calibration: %d", default_zero_val);
|
||||
sensor.set_dry_cal(default_zero_val);
|
||||
delay(200);
|
||||
zero_val = default_zero_val;
|
||||
calibrationReset = true;
|
||||
sensor.get_dry_cal(&zero_val);
|
||||
LOG_INFO("Dry calibration reset complete. New value is %d", zero_val);
|
||||
}
|
||||
if (hundred_val == 0 || hundred_val >= zero_val) {
|
||||
LOG_INFO("Wet calibration not set, using default: %d", default_hundred_val);
|
||||
LOG_INFO("Dry calibration value is %d", zero_val);
|
||||
LOG_INFO("Wet calibration value is %d", hundred_val);
|
||||
LOG_INFO("This does not make sense. You can recalibrate this sensor using the calibration sketch included here: "
|
||||
"https://github.com/RAKWireless/RAK12035_SoilMoisture.");
|
||||
LOG_INFO("For now, setting default calibration value for Wet Calibration: %d", default_hundred_val);
|
||||
sensor.set_wet_cal(default_hundred_val);
|
||||
delay(200);
|
||||
hundred_val = default_hundred_val;
|
||||
calibrationReset = true;
|
||||
sensor.get_wet_cal(&hundred_val);
|
||||
LOG_INFO("Wet calibration reset complete. New value is %d", hundred_val);
|
||||
}
|
||||
if (calibrationReset) {
|
||||
LOG_INFO("Default calibration values applied. Consider running the calibration sketch for better accuracy: "
|
||||
"https://github.com/RAKWireless/RAK12035_SoilMoisture");
|
||||
}
|
||||
|
||||
LOG_INFO("Dry calibration value: %d, Wet calibration value: %d", zero_val, hundred_val);
|
||||
sensor.sensor_sleep();
|
||||
RESTORE_3V3_POWER();
|
||||
delay(200);
|
||||
|
||||
@@ -686,6 +686,9 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks
|
||||
#ifdef NIMBLE_TWO
|
||||
if (ble->isDeInit)
|
||||
return;
|
||||
#else
|
||||
if (nimbleBluetooth && nimbleBluetooth->isDeInit)
|
||||
return;
|
||||
#endif
|
||||
|
||||
meshtastic::BluetoothStatus newStatus(meshtastic::BluetoothStatus::ConnectionState::DISCONNECTED);
|
||||
|
||||
@@ -241,6 +241,7 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false, bool skipSaveN
|
||||
#ifdef PIN_POWER_EN
|
||||
digitalWrite(PIN_POWER_EN, LOW);
|
||||
pinMode(PIN_POWER_EN, INPUT); // power off peripherals
|
||||
// pinMode(PIN_POWER_EN1, INPUT_PULLDOWN);
|
||||
#endif
|
||||
|
||||
#ifdef RAK_WISMESH_TAP_V2
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
#define KB_LOAD 21 // load values from the switch and store in shift register
|
||||
#define KB_CLK 22 // clock pin for serial data out
|
||||
#define KB_DATA 23 // data pin
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
|
||||
@@ -10,6 +10,3 @@ build_flags =
|
||||
-D EBYTE_E22
|
||||
-D EBYTE_E22_900M30S ; Assume Tx power curve is identical to 900M30S as there is no documentation
|
||||
-I variants/esp32/diy/9m2ibr_aprs_lora_tracker
|
||||
build_src_filter =
|
||||
${esp32_base.build_src_filter}
|
||||
+<../variants/esp32/diy/9m2ibr_aprs_lora_tracker>
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "variant.h"
|
||||
#include "Arduino.h"
|
||||
|
||||
void earlyInitVariant()
|
||||
{
|
||||
pinMode(USER_LED, OUTPUT);
|
||||
digitalWrite(USER_LED, HIGH ^ LED_STATE_ON);
|
||||
}
|
||||
@@ -30,6 +30,7 @@ build_flags =
|
||||
-DTFT_BL=32
|
||||
-DSPI_FREQUENCY=40000000
|
||||
-DSPI_READ_FREQUENCY=16000000
|
||||
-DDISABLE_ALL_LIBRARY_WARNINGS
|
||||
lib_ignore =
|
||||
m5stack-core
|
||||
lib_deps =
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#ifndef TOUCH_IRQ
|
||||
#define TOUCH_IRQ -1
|
||||
#endif
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
#define USE_VIRTUAL_KEYBOARD 1
|
||||
|
||||
#define ST7796_NSS 25
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#define LED_PIN 13 // 13 red, 2 blue, 15 red
|
||||
|
||||
// #define HAS_BUTTON 0
|
||||
#define BUTTON_PIN 0
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
|
||||
@@ -16,12 +16,22 @@
|
||||
#define SLEEP_TIME 120
|
||||
|
||||
#define GPS_DEFAULT_NOT_PRESENT 1
|
||||
// #define GPS_RX_PIN 44
|
||||
// #define GPS_TX_PIN 43
|
||||
|
||||
// #define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
// ratio of voltage divider = 2.0 (RD2=100k, RD3=100k)
|
||||
// #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
|
||||
// #define ADC_CHANNEL ADC1_GPIO4_CHANNEL
|
||||
|
||||
// keyboard
|
||||
#define I2C_SDA 47 // I2C pins for this board
|
||||
#define I2C_SCL 14
|
||||
// #define KB_POWERON -1 // must be set to HIGH
|
||||
// #define KB_SLAVE_ADDRESS TDECK_KB_ADDR // 0x55
|
||||
// #define KB_BL_PIN 46 // not used for now
|
||||
#define KB_INT 13
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
#define TFT_DC 39
|
||||
#define TFT_CS 41
|
||||
@@ -34,9 +44,11 @@
|
||||
#define LORA_MOSI 3
|
||||
#define LORA_CS 17
|
||||
|
||||
// #define LORA_DIO0 -1 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 18
|
||||
#define LORA_DIO1 16 // SX1262 IRQ
|
||||
#define LORA_DIO2 15 // SX1262 BUSY
|
||||
// #define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
@@ -46,5 +58,4 @@
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
|
||||
#define LED_NOTIFICATION 1
|
||||
#define LED_STATE_ON 0
|
||||
// #define LED_PIN 1
|
||||
@@ -12,7 +12,7 @@
|
||||
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
|
||||
|
||||
// Button A (44), B (43), R (12), U (13), L (11), D (18)
|
||||
#define BUTTON_PIN 43 // If defined, this will be used for user button presses
|
||||
#define BUTTON_PIN 44 // If defined, this will be used for user button presses
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
#define USE_RF95
|
||||
@@ -20,19 +20,8 @@
|
||||
#define LORA_MISO 7
|
||||
#define LORA_MOSI 8
|
||||
#define LORA_CS 9
|
||||
#define LORA_DIO0 16
|
||||
#define LORA_DIO0 16 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 4
|
||||
|
||||
#define LORA_DIO1 RADIOLIB_NC
|
||||
#define LORA_DIO2 RADIOLIB_NC
|
||||
|
||||
// jk, its not really a trackball but we're gonna pretend!
|
||||
#define HAS_TRACKBALL 1
|
||||
#define TB_UP 13
|
||||
#define TB_DOWN 18
|
||||
#define TB_LEFT 11
|
||||
#define TB_RIGHT 12
|
||||
#define TB_PRESS 44 // BUTTON_PIN
|
||||
#define TB_DIRECTION FALLING
|
||||
|
||||
#define ENABLE_AMBIENTLIGHTING
|
||||
#define LORA_DIO2 RADIOLIB_NC
|
||||
@@ -52,6 +52,8 @@
|
||||
// Picomputer gets a white on black display
|
||||
#define TFT_MESH_OVERRIDE COLOR565(255, 255, 255)
|
||||
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
#define INPUTBROKER_MATRIX_TYPE 1
|
||||
|
||||
#define KEYS_COLS \
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
#define LED_BLUE 45
|
||||
|
||||
#define PIN_LED1 LED_GREEN
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define PIN_LED2 LED_BLUE
|
||||
|
||||
#define LED_CONN LED_BLUE
|
||||
#define LED_PIN LED_GREEN
|
||||
#define ledOff(pin) pinMode(pin, INPUT)
|
||||
|
||||
|
||||
@@ -30,8 +30,9 @@
|
||||
#define LED_BLUE 45
|
||||
|
||||
#define PIN_LED1 LED_GREEN
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define PIN_LED2 LED_BLUE
|
||||
|
||||
#define LED_CONN LED_BLUE
|
||||
#define LED_PIN LED_GREEN
|
||||
#define ledOff(pin) pinMode(pin, INPUT)
|
||||
|
||||
@@ -46,8 +47,10 @@
|
||||
#define SPI_MISO (10)
|
||||
#define SPI_CS (12)
|
||||
|
||||
#define HAS_BUTTON 1
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
#define USE_VIRTUAL_KEYBOARD 1
|
||||
|
||||
#define BATTERY_PIN 1
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
// TCA8418 keyboard
|
||||
#define KB_BL_PIN 42
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
// microphone PCM5102A
|
||||
#define PCM5102A_SCK 47
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#define KB_POWERON 10 // must be set to HIGH
|
||||
#define KB_SLAVE_ADDRESS TDECK_KB_ADDR // 0x55
|
||||
#define KB_BL_PIN 46 // not used for now
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
// trackball
|
||||
#define HAS_TRACKBALL 1
|
||||
|
||||
@@ -45,7 +45,7 @@ lib_deps = ${esp32s3_base.lib_deps}
|
||||
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||
lewisxhe/SensorLib@0.3.4
|
||||
# renovate: datasource=github-tags depName=pschatzmann_arduino-audio-driver packageName=pschatzmann/arduino-audio-driver
|
||||
https://github.com/pschatzmann/arduino-audio-driver/archive/v0.2.0.zip
|
||||
https://github.com/pschatzmann/arduino-audio-driver/archive/v0.2.1.zip
|
||||
# TODO renovate
|
||||
https://github.com/mverch67/BQ27220/archive/07d92be846abd8a0258a50c23198dac0858b22ed.zip
|
||||
# TODO renovate
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#define I2C_NO_RESCAN
|
||||
#define KB_BL_PIN 46
|
||||
#define KB_INT 6
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
// audio codec ES8311
|
||||
#define HAS_I2S
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
// keyboard changes
|
||||
|
||||
#define PIN_BUZZER 43
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
#define INPUTBROKER_MATRIX_TYPE 1
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
// keyboard changes
|
||||
|
||||
#define PIN_BUZZER 43
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
#define INPUTBROKER_MATRIX_TYPE 1
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
// keyboard changes
|
||||
|
||||
#define PIN_BUZZER 43
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
#define INPUTBROKER_MATRIX_TYPE 1
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#define HAS_SCREEN 1
|
||||
#define USE_TFTDISPLAY 1
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
#define HAS_GPS 1
|
||||
#define MAX_RX_TOPHONE portduino_config.maxtophone
|
||||
#define MAX_NUM_NODES portduino_config.MaxNodes
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define HAS_SCREEN 1
|
||||
#endif
|
||||
#define USE_TFTDISPLAY 1
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
#define HAS_GPS 1
|
||||
#define MAX_RX_TOPHONE portduino_config.maxtophone
|
||||
#define MAX_NUM_NODES portduino_config.MaxNodes
|
||||
|
||||
@@ -50,6 +50,8 @@ extern "C" {
|
||||
#define RGBLED_BLUE (0 + 12) // Blue of RGB P0.12
|
||||
#define RGBLED_CA // comment out this line if you have a common cathode type, as defined use common anode logic
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
|
||||
@@ -32,8 +32,15 @@ const uint32_t g_ADigitalPinMap[] = {
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
pinMode(PIN_LED3, OUTPUT);
|
||||
ledOff(PIN_LED3);
|
||||
}
|
||||
|
||||
void variant_shutdown()
|
||||
|
||||
@@ -41,15 +41,21 @@ extern "C" {
|
||||
#define NUM_ANALOG_INPUTS (1)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
#define PIN_LED2 -1
|
||||
#define PIN_LED3 -1
|
||||
|
||||
// LED
|
||||
#define PIN_LED1 (32 + 6) // red
|
||||
#define LED_POWER (32 + 4)
|
||||
#define LED_NOTIFICATION (0 + 13) // green
|
||||
#define USER_LED (0 + 13) // green
|
||||
// USB_CHECK
|
||||
#define EXT_PWR_DETECT (32 + 3)
|
||||
#define ADC_V (0 + 8)
|
||||
|
||||
#define LED_RED PIN_LED3
|
||||
#define LED_BLUE PIN_LED1
|
||||
#define LED_GREEN PIN_LED2
|
||||
#define LED_CONN PIN_GREEN
|
||||
#define LED_STATE_ON 0 // State when LED is lit // LED灯亮时的状态
|
||||
#define PIN_BUZZER (0 + 6)
|
||||
/*
|
||||
@@ -164,6 +170,8 @@ External serial flash WP25R1635FZUIL0
|
||||
#define PIN_SPI_MOSI (0 + 22)
|
||||
#define PIN_SPI_SCK (0 + 19)
|
||||
|
||||
#define PIN_PWR_EN (0 + 6)
|
||||
|
||||
// To debug via the segger JLINK console rather than the CDC-ACM serial device
|
||||
// #define USE_SEGGER
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ void initVariant()
|
||||
digitalWrite(KEY_POWER, HIGH);
|
||||
pinMode(RGB_POWER, OUTPUT);
|
||||
digitalWrite(RGB_POWER, HIGH);
|
||||
pinMode(LED_GREEN, OUTPUT);
|
||||
digitalWrite(LED_GREEN, LED_STATE_OFF);
|
||||
pinMode(green_LED_PIN, OUTPUT);
|
||||
digitalWrite(green_LED_PIN, LED_STATE_OFF);
|
||||
pinMode(LED_BLUE, OUTPUT);
|
||||
pinMode(PIN_POWER_USB, INPUT);
|
||||
pinMode(PIN_POWER_DONE, INPUT);
|
||||
@@ -63,8 +63,8 @@ void initVariant()
|
||||
// called from main-nrf52.cpp during the cpuDeepSleep() function
|
||||
void variant_shutdown()
|
||||
{
|
||||
digitalWrite(LED_RED, HIGH);
|
||||
digitalWrite(LED_GREEN, HIGH);
|
||||
digitalWrite(red_LED_PIN, HIGH);
|
||||
digitalWrite(green_LED_PIN, HIGH);
|
||||
digitalWrite(LED_BLUE, HIGH);
|
||||
|
||||
digitalWrite(PIN_EN1, LOW);
|
||||
@@ -81,8 +81,8 @@ void variant_shutdown()
|
||||
if (pin == PIN_POWER_USB || pin == BUTTON_PIN || pin == PIN_EN1 || pin == PIN_EN2 || pin == DHT_POWER ||
|
||||
pin == ACC_POWER || pin == Battery_POWER || pin == GPS_POWER || pin == LR1110_SPI_MISO_PIN ||
|
||||
pin == LR1110_SPI_MOSI_PIN || pin == LR1110_SPI_SCK_PIN || pin == LR1110_SPI_NSS_PIN || pin == LR1110_BUSY_PIN ||
|
||||
pin == LR1110_NRESET_PIN || pin == LR1110_IRQ_PIN || pin == GPS_TX_PIN || pin == GPS_RX_PIN || pin == LED_GREEN ||
|
||||
pin == LED_RED || pin == LED_BLUE) {
|
||||
pin == LR1110_NRESET_PIN || pin == LR1110_IRQ_PIN || pin == GPS_TX_PIN || pin == GPS_RX_PIN || pin == green_LED_PIN ||
|
||||
pin == red_LED_PIN || pin == LED_BLUE) {
|
||||
continue;
|
||||
}
|
||||
pinMode(pin, OUTPUT);
|
||||
|
||||
@@ -50,11 +50,11 @@ extern "C" {
|
||||
#define EEPROM_POWER 7
|
||||
|
||||
// LED
|
||||
#define LED_RED 33
|
||||
#define LED_POWER LED_RED
|
||||
#define red_LED_PIN 33
|
||||
#define LED_POWER red_LED_PIN
|
||||
#define LED_CHARGE LED_POWER // Signals the Status LED Module to handle this LED
|
||||
#define LED_GREEN 35
|
||||
#define LED_NOTIFICATION LED_GREEN
|
||||
#define green_LED_PIN 35
|
||||
#define PIN_LED2 green_LED_PIN
|
||||
#define LED_BLUE 37
|
||||
#define LED_PAIRING LED_BLUE // Signals the Status LED Module to handle this LED
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@ const uint32_t g_ADigitalPinMap[] = {
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
pinMode(LED_PAIRING, OUTPUT);
|
||||
ledOff(LED_PAIRING);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define LED_BLUE -1
|
||||
#define LED_NOTIFICATION (32 + 9)
|
||||
#define PIN_LED2 (32 + 9)
|
||||
#define LED_PAIRING (13)
|
||||
|
||||
#define Battery_LED_1 (15)
|
||||
|
||||
@@ -43,7 +43,7 @@ extern "C" {
|
||||
#define LED_BLUE -1
|
||||
#define LED_CHARGE (12)
|
||||
#define LED_PAIRING (7)
|
||||
#define LED_NOTIFICATION LED_PAIRING
|
||||
#define PIN_LED2 LED_PAIRING
|
||||
|
||||
#define LED_STATE_ON HIGH
|
||||
#define LED_STATE_OFF LOW
|
||||
|
||||
@@ -32,4 +32,7 @@ void initVariant()
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
|
||||
@@ -27,10 +27,14 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (32 + 10) // LED P1.15
|
||||
#define PIN_LED2 (-1) //
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
#define LED_STATE_ON 0 // State when LED is litted
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
|
||||
@@ -32,4 +32,7 @@ void initVariant()
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
|
||||
@@ -27,10 +27,14 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (32 + 10) // LED P1.15
|
||||
#define PIN_LED2 (-1) //
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
#define LED_STATE_ON 0 // State when LED is litted
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
|
||||
@@ -34,6 +34,8 @@ extern "C" {
|
||||
// #define PIN_LED1 (32 + 9) Green
|
||||
// #define PIN_LED1 (0 + 12) Blue
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@ extern "C" {
|
||||
|
||||
#define LED_BLUE PIN_LED1
|
||||
|
||||
#define LED_CONN PIN_LED3
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
|
||||
/*
|
||||
|
||||
@@ -36,6 +36,7 @@ extern "C" {
|
||||
#define PIN_LED3 LED_RED
|
||||
|
||||
#define PIN_LED PIN_LED1
|
||||
#define LED_PWR (PINS_COUNT)
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ extern "C" {
|
||||
#define LED_GREEN PIN_LED2 // Actually red
|
||||
#define LED_BLUE PIN_LED1
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
#define BUTTON_PIN (32 + 2) // P1.02 7
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -46,10 +46,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -60,6 +62,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -137,6 +137,8 @@ No longer populated on PCB
|
||||
#define PIN_SPI1_MOSI PIN_EINK_MOSI
|
||||
#define PIN_SPI1_SCK PIN_EINK_SCLK
|
||||
|
||||
// #define PIN_PWR_EN (0 + 6)
|
||||
|
||||
// To debug via the segger JLINK console rather than the CDC-ACM serial device
|
||||
// #define USE_SEGGER
|
||||
|
||||
|
||||
@@ -192,6 +192,8 @@ No longer populated on PCB
|
||||
#define PIN_SPI_MOSI (0 + 22)
|
||||
#define PIN_SPI_SCK (0 + 19)
|
||||
|
||||
// #define PIN_PWR_EN (0 + 6)
|
||||
|
||||
// To debug via the segger JLINK console rather than the CDC-ACM serial device
|
||||
// #define USE_SEGGER
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ extern "C" {
|
||||
#define LED_RED PIN_LED1
|
||||
#define LED_BLUE PIN_LED1
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_CONN LED_BLUE
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
|
||||
/*
|
||||
@@ -98,6 +99,8 @@ No longer populated on PCB
|
||||
#define PIN_SPI_MOSI (0 + 5)
|
||||
#define PIN_SPI_SCK (0 + 4)
|
||||
|
||||
// #define PIN_PWR_EN (0 + 6)
|
||||
|
||||
// To debug via the segger JLINK console rather than the CDC-ACM serial device
|
||||
// #define USE_SEGGER
|
||||
|
||||
|
||||
@@ -132,6 +132,8 @@ No longer populated on PCB
|
||||
#define PIN_SPI_MOSI (0 + 22)
|
||||
#define PIN_SPI_SCK (0 + 19)
|
||||
|
||||
// #define PIN_PWR_EN (0 + 6)
|
||||
|
||||
// To debug via the segger JLINK console rather than the CDC-ACM serial device
|
||||
// #define USE_SEGGER
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ const uint32_t g_ADigitalPinMap[] = {
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
// LED1 & LED_BLUE
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(LED_BLUE, OUTPUT);
|
||||
ledOff(LED_BLUE);
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
|
||||
@@ -47,9 +47,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -62,6 +65,8 @@ extern "C" {
|
||||
#define INPUTDRIVER_ENCODER_BTN 28
|
||||
#define UPDOWN_LONG_PRESS_REPEAT_INTERVAL 150
|
||||
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
/*
|
||||
* Buzzer - PWM
|
||||
*/
|
||||
|
||||
@@ -35,4 +35,7 @@ void initVariant()
|
||||
// LED1 & LED2
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
}
|
||||
|
||||
@@ -50,10 +50,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36) // Connected to WWAN host LED (if present)
|
||||
#define PIN_LED2 (36) // Connected to WWAN host LED (if present)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -64,6 +66,8 @@ extern "C" {
|
||||
// #define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -63,8 +63,8 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
digitalWrite(PIN_LED1, HIGH);
|
||||
|
||||
pinMode(LED_BLUE, OUTPUT);
|
||||
digitalWrite(LED_BLUE, HIGH);
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
digitalWrite(PIN_LED2, HIGH);
|
||||
|
||||
// Initialize LoRa pins
|
||||
pinMode(SX126X_RESET, OUTPUT);
|
||||
|
||||
@@ -43,9 +43,9 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (32 + 3) // P1.03, Green
|
||||
#define LED_BLUE (32 + 4) // P1.04, Blue
|
||||
#define PIN_LED2 (32 + 4) // P1.04, Blue
|
||||
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
|
||||
// Buttons
|
||||
|
||||
@@ -41,6 +41,17 @@ extern "C" {
|
||||
#define NUM_ANALOG_INPUTS (1)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (-1)
|
||||
#define PIN_LED2 (-1)
|
||||
#define PIN_LED3 (-1)
|
||||
|
||||
#define LED_RED PIN_LED3
|
||||
#define LED_BLUE PIN_LED1
|
||||
#define LED_GREEN PIN_LED2
|
||||
|
||||
#define LED_CONN PIN_GREEN
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
|
||||
/*
|
||||
@@ -141,6 +152,8 @@ External serial flash W25Q16JV_IQ
|
||||
#define PIN_SPI_MOSI (0 + 11)
|
||||
#define PIN_SPI_SCK (0 + 12)
|
||||
|
||||
// #define PIN_PWR_EN (0 + 6)
|
||||
|
||||
// To debug via the segger JLINK console rather than the CDC-ACM serial device
|
||||
// #define USE_SEGGER
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ extends = arduino_base
|
||||
platform_packages =
|
||||
; our custom Git version until they merge our PR
|
||||
# TODO renovate
|
||||
platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#74096746e5f167a2ff22e483d8e79bb1aef00591
|
||||
platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#c770c8a16a351b55b86e347a3d9d7b74ad0bbf39
|
||||
; Don't renovate toolchain-gccarmnoneeabi
|
||||
platformio/toolchain-gccarmnoneeabi@~1.90301.0
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
// pinMode(PIN_3V3_EN, OUTPUT);
|
||||
// digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (32 + 4) // P1.04 Controls Green LED
|
||||
#define LED_BLUE (28) // P0.28 Controls Blue LED
|
||||
#define PIN_LED2 (28) // P0.28 Controls Blue LED
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -46,10 +46,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -60,6 +62,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
@@ -248,9 +252,13 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
#define RV3028_RTC (uint8_t)0b1010010
|
||||
|
||||
// RAK18001 Buzzer in Slot C
|
||||
// #define PIN_BUZZER 21 // IO3 is PWM2
|
||||
#define PIN_BUZZER 21 // IO3 is PWM2
|
||||
// NEW: set this via protobuf instead!
|
||||
|
||||
// RAK4631 custom ringtone
|
||||
#undef USERPREFS_RINGTONE_RTTTL
|
||||
#define USERPREFS_RINGTONE_RTTTL "Rak:d=32,o=5,b=200:b7,p,b7,4p,p"
|
||||
|
||||
// Battery
|
||||
// The battery sense is hooked to pin A0 (5)
|
||||
#define BATTERY_PIN PIN_A0
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -27,10 +27,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
|
||||
@@ -36,6 +36,9 @@ void initVariant()
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
ledOff(PIN_LED1);
|
||||
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
ledOff(PIN_LED2);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
@@ -45,10 +45,12 @@ extern "C" {
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (35)
|
||||
#define LED_BLUE (36)
|
||||
#define PIN_LED2 (36)
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_NOTIFICATION LED_BLUE
|
||||
#define LED_BLUE PIN_LED2
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
@@ -59,6 +61,8 @@ extern "C" {
|
||||
#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion such as the RAK14014 or RAK14015 TFT modules
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define PIN_BUTTON2 12
|
||||
#define PIN_BUTTON3 24
|
||||
#define PIN_BUTTON4 25
|
||||
|
||||
/*
|
||||
* Analog pins
|
||||
@@ -278,6 +282,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
|
||||
#define RAK14014 // Tell it we have a RAK14014
|
||||
#define USER_SETUP_LOADED 1
|
||||
#define DISABLE_ALL_LIBRARY_WARNINGS 1
|
||||
#define ST7789_DRIVER 1
|
||||
#define TFT_WIDTH 240
|
||||
#define TFT_HEIGHT 320
|
||||
@@ -305,6 +310,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
#define USE_POWERSAVE
|
||||
#define SLEEP_TIME 120
|
||||
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
#define USE_VIRTUAL_KEYBOARD 1
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
#define PIN_LED1 (12) // LED P1.15
|
||||
#define PIN_LED2 (11) //
|
||||
|
||||
#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
|
||||
|
||||
@@ -23,9 +23,12 @@
|
||||
#define PIN_LED1 (11) // LED P1.15
|
||||
#define PIN_LED2 (12) //
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
// #define LED_PIN PIN_LED2
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
// Button Configuration
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -154,6 +157,8 @@ static const uint8_t SCL = PIN_WIRE_SCL;
|
||||
// joystick
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
#define CANNED_MESSAGE_ADD_CONFIRMATION 1
|
||||
|
||||
// trackball
|
||||
|
||||
@@ -23,9 +23,12 @@
|
||||
#define PIN_LED1 (11) // LED P1.15
|
||||
#define PIN_LED2 (12) //
|
||||
|
||||
#define LED_CONN PIN_LED2
|
||||
|
||||
#define LED_GREEN PIN_LED1
|
||||
#define LED_BLUE PIN_LED2
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
// #define LED_PIN PIN_LED2
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
// Button Configuration
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -173,6 +176,7 @@ static const uint8_t SCL = PIN_WIRE_SCL;
|
||||
#define TB_PRESS 29
|
||||
#define TB_DIRECTION FALLING
|
||||
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
#define CANNED_MESSAGE_ADD_CONFIRMATION 1
|
||||
|
||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
@@ -69,6 +69,9 @@ static const uint8_t A5 = PIN_A5;
|
||||
#define PIN_LED2 LED_BLUE
|
||||
#define PIN_LED3 LED_RED
|
||||
|
||||
#define LED_PWR LED_RED
|
||||
#define USER_LED LED_BLUE
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
|
||||
@@ -52,6 +52,7 @@ extern "C" {
|
||||
|
||||
#define BLE_LED LED_BLUE
|
||||
#define BLE_LED_INVERTED 1
|
||||
#define LED_CONN LED_GREEN
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
|
||||
// Buttons
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user