mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-07 07:10:14 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
10e9374a89
@ -1,4 +1,4 @@
|
|||||||
name: Test Simulator
|
name: End to end tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
@ -55,3 +55,37 @@ jobs:
|
|||||||
name: PlatformIO Tests
|
name: PlatformIO Tests
|
||||||
path: testreport.xml
|
path: testreport.xml
|
||||||
reporter: java-junit
|
reporter: java-junit
|
||||||
|
|
||||||
|
hardware-tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Upgrade python tools
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U --no-build-isolation --no-cache-dir "setuptools<72"
|
||||||
|
pip install -U platformio adafruit-nrfutil --no-build-isolation
|
||||||
|
pip install -U poetry --no-build-isolation
|
||||||
|
pip install -U meshtastic --pre --no-build-isolation
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v2
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: Setup devices
|
||||||
|
run: pnpm run setup
|
||||||
|
|
||||||
|
- name: Execute end to end tests on connected hardware
|
||||||
|
run: pnpm run test
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,6 @@
|
|||||||
[submodule "protobufs"]
|
[submodule "protobufs"]
|
||||||
path = protobufs
|
path = protobufs
|
||||||
url = https://github.com/meshtastic/protobufs.git
|
url = https://github.com/meshtastic/protobufs.git
|
||||||
|
[submodule "meshtestic"]
|
||||||
|
path = meshtestic
|
||||||
|
url = https://github.com/meshtastic/meshTestic
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"mcu": "esp32s3",
|
"mcu": "esp32s3",
|
||||||
"variant": "CDEBYTE_EoRa-S3"
|
"variant": "CDEBYTE_EoRa-S3"
|
||||||
},
|
},
|
||||||
"connectivity": ["wifi"],
|
"connectivity": ["wifi", "bluetooth"],
|
||||||
"debug": {
|
"debug": {
|
||||||
"openocd_target": "esp32s3.cfg"
|
"openocd_target": "esp32s3.cfg"
|
||||||
},
|
},
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"mcu": "esp32s3",
|
"mcu": "esp32s3",
|
||||||
"variant": "ESP32-S3-WROOM-1-N4"
|
"variant": "ESP32-S3-WROOM-1-N4"
|
||||||
},
|
},
|
||||||
"connectivity": ["wifi"],
|
"connectivity": ["wifi", "bluetooth"],
|
||||||
"debug": {
|
"debug": {
|
||||||
"default_tool": "esp-builtin",
|
"default_tool": "esp-builtin",
|
||||||
"onboard_tools": ["esp-builtin"],
|
"onboard_tools": ["esp-builtin"],
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"mcu": "esp32s3",
|
"mcu": "esp32s3",
|
||||||
"variant": "tlora-t3s3-v1"
|
"variant": "tlora-t3s3-v1"
|
||||||
},
|
},
|
||||||
"connectivity": ["wifi"],
|
"connectivity": ["wifi", "bluetooth"],
|
||||||
"debug": {
|
"debug": {
|
||||||
"openocd_target": "esp32s3.cfg"
|
"openocd_target": "esp32s3.cfg"
|
||||||
},
|
},
|
||||||
|
1
meshtestic
Submodule
1
meshtestic
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 31ee3d90c8bef61e835c3271be2c7cda8c4a5cc2
|
@ -1 +1 @@
|
|||||||
Subproject commit 431291e673c1c7592ee64cb972d7845589f60138
|
Subproject commit 5f7c91adb97187e0cb2140de7057344d93444bd1
|
@ -157,7 +157,7 @@ bool EInkDisplay::connect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213) || \
|
#elif defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213) || \
|
||||||
defined(HELTEC_VISION_MASTER_E290)
|
defined(HELTEC_VISION_MASTER_E290) || defined(TLORA_T3S3_EPAPER)
|
||||||
{
|
{
|
||||||
// Start HSPI
|
// Start HSPI
|
||||||
hspi = new SPIClass(HSPI);
|
hspi = new SPIClass(HSPI);
|
||||||
|
@ -68,7 +68,7 @@ class EInkDisplay : public OLEDDisplay
|
|||||||
|
|
||||||
// If display uses HSPI
|
// If display uses HSPI
|
||||||
#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_VISION_MASTER_E213) || \
|
#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_VISION_MASTER_E213) || \
|
||||||
defined(HELTEC_VISION_MASTER_E290)
|
defined(HELTEC_VISION_MASTER_E290) || defined(TLORA_T3S3_EPAPER)
|
||||||
SPIClass *hspi = NULL;
|
SPIClass *hspi = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -40,19 +40,30 @@ void fixPriority(meshtastic_MeshPacket *p)
|
|||||||
// We might receive acks from other nodes (and since generated remotely, they won't have priority assigned. Check for that
|
// We might receive acks from other nodes (and since generated remotely, they won't have priority assigned. Check for that
|
||||||
// and fix it
|
// and fix it
|
||||||
if (p->priority == meshtastic_MeshPacket_Priority_UNSET) {
|
if (p->priority == meshtastic_MeshPacket_Priority_UNSET) {
|
||||||
// if acks give high priority
|
|
||||||
// if a reliable message give a bit higher default priority
|
// if a reliable message give a bit higher default priority
|
||||||
p->priority = (p->decoded.portnum == meshtastic_PortNum_ROUTING_APP)
|
p->priority = (p->want_ack ? meshtastic_MeshPacket_Priority_RELIABLE : meshtastic_MeshPacket_Priority_DEFAULT);
|
||||||
? meshtastic_MeshPacket_Priority_ACK
|
if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
|
||||||
: (p->want_ack ? meshtastic_MeshPacket_Priority_RELIABLE : meshtastic_MeshPacket_Priority_DEFAULT);
|
// if acks/naks give very high priority
|
||||||
|
if (p->decoded.portnum == meshtastic_PortNum_ROUTING_APP) {
|
||||||
|
p->priority = meshtastic_MeshPacket_Priority_ACK;
|
||||||
|
// if text or admin, give high priority
|
||||||
|
} else if (p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP ||
|
||||||
|
p->decoded.portnum == meshtastic_PortNum_ADMIN_APP) {
|
||||||
|
p->priority = meshtastic_MeshPacket_Priority_HIGH;
|
||||||
|
// if it is a response, give higher priority to let it arrive early and stop the request being relayed
|
||||||
|
} else if (p->decoded.request_id != 0) {
|
||||||
|
p->priority = meshtastic_MeshPacket_Priority_RESPONSE;
|
||||||
|
// Also if we want a response, give a bit higher priority
|
||||||
|
} else if (p->decoded.want_response) {
|
||||||
|
p->priority = meshtastic_MeshPacket_Priority_RELIABLE;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** enqueue a packet, return false if full */
|
/** enqueue a packet, return false if full */
|
||||||
bool MeshPacketQueue::enqueue(meshtastic_MeshPacket *p)
|
bool MeshPacketQueue::enqueue(meshtastic_MeshPacket *p)
|
||||||
{
|
{
|
||||||
fixPriority(p);
|
|
||||||
|
|
||||||
// no space - try to replace a lower priority packet in the queue
|
// no space - try to replace a lower priority packet in the queue
|
||||||
if (queue.size() >= maxLen) {
|
if (queue.size() >= maxLen) {
|
||||||
return replaceLowerPriorityPacket(p);
|
return replaceLowerPriorityPacket(p);
|
||||||
|
@ -48,4 +48,7 @@ extern Allocator<meshtastic_MeshPacket> &packetPool;
|
|||||||
* Most (but not always) of the time we want to treat packets 'from' the local phone (where from == 0), as if they originated on
|
* Most (but not always) of the time we want to treat packets 'from' the local phone (where from == 0), as if they originated on
|
||||||
* the local node. If from is zero this function returns our node number instead
|
* the local node. If from is zero this function returns our node number instead
|
||||||
*/
|
*/
|
||||||
NodeNum getFrom(const meshtastic_MeshPacket *p);
|
NodeNum getFrom(const meshtastic_MeshPacket *p);
|
||||||
|
|
||||||
|
/* Some clients might not properly set priority, therefore we fix it here. */
|
||||||
|
void fixPriority(meshtastic_MeshPacket *p);
|
@ -317,7 +317,7 @@ void NodeDB::installDefaultConfig()
|
|||||||
#else
|
#else
|
||||||
config.device.disable_triple_click = true;
|
config.device.disable_triple_click = true;
|
||||||
#endif
|
#endif
|
||||||
#if !HAS_GPS || defined(T_DECK)
|
#if !HAS_GPS || defined(T_DECK) || defined(TLORA_T3S3_EPAPER)
|
||||||
config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT;
|
config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT;
|
||||||
#elif !defined(GPS_RX_PIN)
|
#elif !defined(GPS_RX_PIN)
|
||||||
if (config.position.rx_gpio == 0)
|
if (config.position.rx_gpio == 0)
|
||||||
|
@ -259,6 +259,9 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
|||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_security_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_security_tag;
|
||||||
fromRadioScratch.config.payload_variant.security = config.security;
|
fromRadioScratch.config.payload_variant.security = config.security;
|
||||||
break;
|
break;
|
||||||
|
case meshtastic_Config_sessionkey_tag:
|
||||||
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_sessionkey_tag;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("Unknown config type %d\n", config_state);
|
LOG_ERROR("Unknown config type %d\n", config_state);
|
||||||
}
|
}
|
||||||
|
@ -165,6 +165,9 @@ meshtastic_QueueStatus Router::getQueueStatus()
|
|||||||
|
|
||||||
ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src)
|
ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src)
|
||||||
{
|
{
|
||||||
|
if (p->to == 0) {
|
||||||
|
LOG_ERROR("Packet received with to: of 0!\n");
|
||||||
|
}
|
||||||
// No need to deliver externally if the destination is the local node
|
// No need to deliver externally if the destination is the local node
|
||||||
if (p->to == nodeDB->getNodeNum()) {
|
if (p->to == nodeDB->getNodeNum()) {
|
||||||
printPacket("Enqueued local", p);
|
printPacket("Enqueued local", p);
|
||||||
@ -252,6 +255,8 @@ ErrorCode Router::send(meshtastic_MeshPacket *p)
|
|||||||
return meshtastic_Routing_Error_BAD_REQUEST;
|
return meshtastic_Routing_Error_BAD_REQUEST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fixPriority(p); // Before encryption, fix the priority if it's unset
|
||||||
|
|
||||||
// If the packet is not yet encrypted, do so now
|
// If the packet is not yet encrypted, do so now
|
||||||
if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
|
if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
|
||||||
ChannelIndex chIndex = p->channel; // keep as a local because we are about to change it
|
ChannelIndex chIndex = p->channel; // keep as a local because we are about to change it
|
||||||
|
@ -199,9 +199,9 @@ typedef enum _meshtastic_HardwareModel {
|
|||||||
^^^ short A0 to switch to I2C address 0x3C */
|
^^^ short A0 to switch to I2C address 0x3C */
|
||||||
meshtastic_HardwareModel_RP2040_FEATHER_RFM95 = 76,
|
meshtastic_HardwareModel_RP2040_FEATHER_RFM95 = 76,
|
||||||
/* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, Paper) https://m5stack.com/ */
|
/* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, Paper) https://m5stack.com/ */
|
||||||
meshtastic_HardwareModel_M5STACK_COREBASIC=77,
|
|
||||||
/* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, Paper) https://m5stack.com/ */
|
meshtastic_HardwareModel_M5STACK_COREBASIC = 77,
|
||||||
meshtastic_HardwareModel_M5STACK_CORE2=78,
|
meshtastic_HardwareModel_M5STACK_CORE2 = 78,
|
||||||
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------ */
|
------------------------------------------------------------------------------------------------------------------------------------------ */
|
||||||
@ -353,6 +353,11 @@ typedef enum _meshtastic_MeshPacket_Priority {
|
|||||||
/* If priority is unset but the message is marked as want_ack,
|
/* If priority is unset but the message is marked as want_ack,
|
||||||
assume it is important and use a slightly higher priority */
|
assume it is important and use a slightly higher priority */
|
||||||
meshtastic_MeshPacket_Priority_RELIABLE = 70,
|
meshtastic_MeshPacket_Priority_RELIABLE = 70,
|
||||||
|
/* If priority is unset but the packet is a response to a request, we want it to get there relatively quickly.
|
||||||
|
Furthermore, responses stop relaying packets directed to a node early. */
|
||||||
|
meshtastic_MeshPacket_Priority_RESPONSE = 80,
|
||||||
|
/* Higher priority for specific message types (portnums) to distinguish between other reliable packets. */
|
||||||
|
meshtastic_MeshPacket_Priority_HIGH = 100,
|
||||||
/* Ack/naks are sent with very high priority to ensure that retransmission
|
/* Ack/naks are sent with very high priority to ensure that retransmission
|
||||||
stops as soon as possible */
|
stops as soon as possible */
|
||||||
meshtastic_MeshPacket_Priority_ACK = 120,
|
meshtastic_MeshPacket_Priority_ACK = 120,
|
||||||
|
@ -69,7 +69,9 @@ typedef enum _meshtastic_TelemetrySensorType {
|
|||||||
/* ICM-20948 9-Axis digital motion processor */
|
/* ICM-20948 9-Axis digital motion processor */
|
||||||
meshtastic_TelemetrySensorType_ICM20948 = 27,
|
meshtastic_TelemetrySensorType_ICM20948 = 27,
|
||||||
/* MAX17048 1S lipo battery sensor (voltage, state of charge, time to go) */
|
/* MAX17048 1S lipo battery sensor (voltage, state of charge, time to go) */
|
||||||
meshtastic_TelemetrySensorType_MAX17048 = 28
|
meshtastic_TelemetrySensorType_MAX17048 = 28,
|
||||||
|
/* Custom I2C sensor implementation based on https://github.com/meshtastic/i2c-sensor */
|
||||||
|
meshtastic_TelemetrySensorType_CUSTOM_SENSOR = 29
|
||||||
} meshtastic_TelemetrySensorType;
|
} meshtastic_TelemetrySensorType;
|
||||||
|
|
||||||
/* Struct definitions */
|
/* Struct definitions */
|
||||||
@ -265,8 +267,8 @@ extern "C" {
|
|||||||
|
|
||||||
/* Helper constants for enums */
|
/* Helper constants for enums */
|
||||||
#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET
|
#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET
|
||||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_MAX17048
|
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_CUSTOM_SENSOR
|
||||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_MAX17048+1))
|
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_CUSTOM_SENSOR+1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
|
|||||||
tv.tv_sec = r->set_time_only;
|
tv.tv_sec = r->set_time_only;
|
||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
|
|
||||||
perhapsSetRTC(RTCQualityFromNet, &tv, false);
|
perhapsSetRTC(RTCQualityNTP, &tv, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case meshtastic_AdminMessage_enter_dfu_mode_request_tag: {
|
case meshtastic_AdminMessage_enter_dfu_mode_request_tag: {
|
||||||
@ -1028,4 +1028,4 @@ bool AdminModule::messageIsRequest(meshtastic_AdminMessage *r)
|
|||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,7 @@ void NeighborInfoModule::sendNeighborInfo(NodeNum dest, bool wantReplies)
|
|||||||
// because we want to get neighbors for the next cycle
|
// because we want to get neighbors for the next cycle
|
||||||
p->to = dest;
|
p->to = dest;
|
||||||
p->decoded.want_response = wantReplies;
|
p->decoded.want_response = wantReplies;
|
||||||
|
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;
|
||||||
printNeighborInfo("SENDING", &neighborInfo);
|
printNeighborInfo("SENDING", &neighborInfo);
|
||||||
service->sendToMesh(p, RX_SRC_LOCAL, true);
|
service->sendToMesh(p, RX_SRC_LOCAL, true);
|
||||||
}
|
}
|
||||||
|
@ -129,6 +129,10 @@ void PositionModule::trySetRtc(meshtastic_Position p, bool isLocal, bool forceUp
|
|||||||
LOG_DEBUG("Ignoring time from mesh because we have a GPS, RTC, or Phone/NTP time source in the past day\n");
|
LOG_DEBUG("Ignoring time from mesh because we have a GPS, RTC, or Phone/NTP time source in the past day\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!isLocal && p.location_source < meshtastic_Position_LocSource_LOC_INTERNAL) {
|
||||||
|
LOG_DEBUG("Ignoring time from mesh because it has a unknown or manual source\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
uint32_t secs = p.time;
|
uint32_t secs = p.time;
|
||||||
|
|
||||||
@ -191,6 +195,10 @@ meshtastic_MeshPacket *PositionModule::allocReply()
|
|||||||
p.has_longitude_i = true;
|
p.has_longitude_i = true;
|
||||||
p.time = getValidTime(RTCQualityNTP) > 0 ? getValidTime(RTCQualityNTP) : localPosition.time;
|
p.time = getValidTime(RTCQualityNTP) > 0 ? getValidTime(RTCQualityNTP) : localPosition.time;
|
||||||
|
|
||||||
|
if (config.position.fixed_position) {
|
||||||
|
p.location_source = meshtastic_Position_LocSource_LOC_MANUAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE) {
|
if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE) {
|
||||||
if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE_MSL) {
|
if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE_MSL) {
|
||||||
p.altitude = localPosition.altitude;
|
p.altitude = localPosition.altitude;
|
||||||
|
@ -122,6 +122,8 @@
|
|||||||
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_WIRELESS_PAPER
|
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_WIRELESS_PAPER
|
||||||
#elif defined(TLORA_T3S3_V1)
|
#elif defined(TLORA_T3S3_V1)
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_TLORA_T3_S3
|
#define HW_VENDOR meshtastic_HardwareModel_TLORA_T3_S3
|
||||||
|
#elif defined(TLORA_T3S3_EPAPER)
|
||||||
|
#define HW_VENDOR meshtastic_HardwareModel_TLORA_T3_S3
|
||||||
#elif defined(CDEBYTE_EORA_S3)
|
#elif defined(CDEBYTE_EORA_S3)
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_CDEBYTE_EORA_S3
|
#define HW_VENDOR meshtastic_HardwareModel_CDEBYTE_EORA_S3
|
||||||
#elif defined(BETAFPV_2400_TX)
|
#elif defined(BETAFPV_2400_TX)
|
||||||
|
@ -7,6 +7,7 @@ debug_tool = jlink
|
|||||||
# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.
|
# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.
|
||||||
build_flags = ${nrf52840_base.build_flags} -Ivariants/heltec_mesh_node_t114
|
build_flags = ${nrf52840_base.build_flags} -Ivariants/heltec_mesh_node_t114
|
||||||
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
|
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
|
||||||
|
-DGPS_POWER_TOGGLE
|
||||||
|
|
||||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_mesh_node_t114>
|
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_mesh_node_t114>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
|
26
variants/tlora_t3s3_epaper/pins_arduino.h
Normal file
26
variants/tlora_t3s3_epaper/pins_arduino.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#ifndef Pins_Arduino_h
|
||||||
|
#define Pins_Arduino_h
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define USB_VID 0x303a
|
||||||
|
#define USB_PID 0x1001
|
||||||
|
|
||||||
|
// The default Wire will be mapped to PMU and RTC
|
||||||
|
static const uint8_t SDA = 18;
|
||||||
|
static const uint8_t SCL = 12; // t3s3 e-Paper has no pin 17 as t3s3 v1, so use another free pin next to it
|
||||||
|
|
||||||
|
// Default SPI will be mapped to Radio
|
||||||
|
static const uint8_t SS = 7;
|
||||||
|
static const uint8_t MOSI = 6;
|
||||||
|
static const uint8_t MISO = 3;
|
||||||
|
static const uint8_t SCK = 5;
|
||||||
|
|
||||||
|
#define SPI_MOSI (11)
|
||||||
|
#define SPI_SCK (14)
|
||||||
|
#define SPI_MISO (2)
|
||||||
|
#define SPI_CS (13)
|
||||||
|
|
||||||
|
#define SDCARD_CS SPI_CS
|
||||||
|
|
||||||
|
#endif /* Pins_Arduino_h */
|
23
variants/tlora_t3s3_epaper/platformio.ini
Normal file
23
variants/tlora_t3s3_epaper/platformio.ini
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[env:tlora-t3s3-epaper]
|
||||||
|
extends = esp32s3_base
|
||||||
|
board = tlora-t3s3-v1
|
||||||
|
board_check = true
|
||||||
|
upload_protocol = esptool
|
||||||
|
|
||||||
|
build_flags =
|
||||||
|
${esp32_base.build_flags} -D TLORA_T3S3_EPAPER -I variants/tlora_t3s3_epaper
|
||||||
|
-DGPS_POWER_TOGGLE
|
||||||
|
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
||||||
|
-DEINK_WIDTH=250
|
||||||
|
-DEINK_HEIGHT=122
|
||||||
|
-DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||||
|
-DEINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted
|
||||||
|
-DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates
|
||||||
|
-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates
|
||||||
|
-DEINK_HASQUIRK_VICIOUSFASTREFRESH ; Identify that pixels drawn by fast-refresh are harder to clear
|
||||||
|
;-DEINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated
|
||||||
|
;-DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
||||||
|
|
||||||
|
lib_deps =
|
||||||
|
${esp32s3_base.lib_deps}
|
||||||
|
https://github.com/meshtastic/GxEPD2#b202ebfec6a4821e098cf7a625ba0f6f2400292d
|
69
variants/tlora_t3s3_epaper/variant.h
Normal file
69
variants/tlora_t3s3_epaper/variant.h
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
#define HAS_SDCARD
|
||||||
|
#define SDCARD_USE_SPI1
|
||||||
|
|
||||||
|
// Display (E-Ink)
|
||||||
|
#define USE_EINK
|
||||||
|
#define PIN_EINK_CS 15
|
||||||
|
#define PIN_EINK_BUSY 48
|
||||||
|
#define PIN_EINK_DC 16
|
||||||
|
#define PIN_EINK_RES 47
|
||||||
|
#define PIN_EINK_SCLK 14
|
||||||
|
#define PIN_EINK_MOSI 11
|
||||||
|
|
||||||
|
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to
|
||||||
|
// measure battery voltage ratio of voltage divider = 2.0 (assumption)
|
||||||
|
#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
|
||||||
|
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
|
||||||
|
|
||||||
|
#define I2C_SDA SDA
|
||||||
|
#define I2C_SCL SCL
|
||||||
|
|
||||||
|
// external qwiic connector
|
||||||
|
#define GPS_RX_PIN 44
|
||||||
|
#define GPS_TX_PIN 43
|
||||||
|
|
||||||
|
#define LED_PIN 37
|
||||||
|
#define BUTTON_PIN 0
|
||||||
|
#define BUTTON_NEED_PULLUP
|
||||||
|
|
||||||
|
// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and
|
||||||
|
// we will probe at runtime for RF95 and if not found then probe for SX1262
|
||||||
|
#define USE_RF95 // RFM95/SX127x
|
||||||
|
#define USE_SX1262
|
||||||
|
#define USE_SX1280
|
||||||
|
|
||||||
|
#define LORA_SCK 5
|
||||||
|
#define LORA_MISO 3
|
||||||
|
#define LORA_MOSI 6
|
||||||
|
#define LORA_CS 7
|
||||||
|
#define LORA_RESET 8
|
||||||
|
|
||||||
|
// per SX1276_Receive_Interrupt/utilities.h
|
||||||
|
#define LORA_DIO0 9
|
||||||
|
#define LORA_DIO1 33 // TCXO_EN ?
|
||||||
|
#define LORA_DIO2 34
|
||||||
|
#define LORA_RXEN 21
|
||||||
|
#define LORA_TXEN 10
|
||||||
|
|
||||||
|
// per SX1262_Receive_Interrupt/utilities.h
|
||||||
|
#ifdef USE_SX1262
|
||||||
|
#define SX126X_CS LORA_CS
|
||||||
|
#define SX126X_DIO1 33
|
||||||
|
#define SX126X_BUSY 34
|
||||||
|
#define SX126X_RESET LORA_RESET
|
||||||
|
#define SX126X_DIO2_AS_RF_SWITCH
|
||||||
|
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// per SX128x_Receive_Interrupt/utilities.h
|
||||||
|
#ifdef USE_SX1280
|
||||||
|
#define SX128X_CS LORA_CS
|
||||||
|
#define SX128X_DIO1 9
|
||||||
|
#define SX128X_DIO2 33
|
||||||
|
#define SX128X_DIO3 34
|
||||||
|
#define SX128X_BUSY 36
|
||||||
|
#define SX128X_RESET LORA_RESET
|
||||||
|
#define SX128X_RXEN 21
|
||||||
|
#define SX128X_TXEN 10
|
||||||
|
#define SX128X_MAX_POWER 3
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user