Merge branch 'master' into dismiss_frames

This commit is contained in:
Jason P 2025-07-20 11:18:47 -05:00 committed by GitHub
commit efdd24bc7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
50 changed files with 260 additions and 120 deletions

View File

@ -8,15 +8,15 @@ plugins:
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- checkov@3.2.450
- renovate@41.30.5
- checkov@3.2.451
- renovate@41.37.9
- prettier@3.6.2
- trufflehog@3.89.2
- trufflehog@3.90.0
- yamllint@1.37.1
- bandit@1.8.6
- trivy@0.64.1
- taplo@0.9.3
- ruff@0.12.2
- ruff@0.12.3
- isort@6.0.1
- markdownlint@0.45.0
- oxipng@9.1.5

View File

@ -39,7 +39,7 @@ build_flags =
-Isrc/platform/portduino
-DRADIOLIB_EEPROM_UNSUPPORTED
-DPORTDUINO_LINUX_HARDWARE
-DHAS_UDP_MULTICAST
-DHAS_UDP_MULTICAST=1
-lpthread
-lstdc++fs
-lbluetooth

View File

@ -69,10 +69,7 @@ int32_t BuzzerFeedbackThread::runOnce()
// This thread is primarily event-driven, but we can use runOnce
// for any periodic tasks if needed in the future
if (needsUpdate) {
needsUpdate = false;
// Could add any periodic processing here
}
needsUpdate = false;
// Run every 100ms when active, less frequently when idle
return needsUpdate ? 100 : 1000;

View File

@ -1016,7 +1016,7 @@ void Screen::setFrames(FrameFocus focus)
// Insert favorite frames *after* collecting them all
if (!favoriteFrames.empty()) {
fsi.positions.firstFavorite = numframes;
for (auto &f : favoriteFrames) {
for (const auto &f : favoriteFrames) {
normalFrames[numframes++] = f;
indicatorIcons.push_back(icon_node);
}

View File

@ -218,7 +218,6 @@ void drawDigitalClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int1
hour %= 12;
if (hour == 0)
hour = 12;
bool isPM = hour >= 12;
snprintf(timeString, sizeof(timeString), "%d:%02d", hour, minute);
} else {
snprintf(timeString, sizeof(timeString), "%02d:%02d", hour, minute);
@ -366,9 +365,6 @@ void drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
// hour hand radius and y coordinate
int16_t hourHandRadius = radius * 0.35;
if (isHighResolution) {
int16_t hourHandRadius = radius * 0.55;
}
int16_t hourHandNoonY = centerY - hourHandRadius;
display->setColor(OLEDDISPLAY_COLOR::WHITE);
@ -386,7 +382,7 @@ void drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
bool isPM = hour >= 12;
if (config.display.use_12h_clock) {
bool isPM = hour >= 12;
isPM = hour >= 12;
display->setFont(FONT_SMALL);
int yOffset = isHighResolution ? 1 : 0;
#ifdef USE_EINK

View File

@ -24,7 +24,7 @@ struct ButtonConfig {
bool touchQuirk = false;
// Constructor to set required parameter
ButtonConfig(uint8_t pin = 0) : pinNumber(pin) {}
explicit ButtonConfig(uint8_t pin = 0) : pinNumber(pin) {}
};
#ifndef BUTTON_CLICK_MS
@ -62,7 +62,7 @@ class ButtonThread : public Observable<const InputEvent *>, public concurrency::
BUTTON_EVENT_COMBO_SHORT_LONG,
};
ButtonThread(const char *name);
explicit ButtonThread(const char *name);
int32_t runOnce() override;
OneButton userButton;
void attachButtonInterrupts();

View File

@ -121,7 +121,7 @@ meshtastic_MeshPacket *MeshPacketQueue::remove(NodeNum from, PacketId id, bool t
bool MeshPacketQueue::find(const NodeNum from, const PacketId id)
{
for (auto it = queue.begin(); it != queue.end(); it++) {
const auto p = (*it);
const auto *p = *it;
if (getFrom(p) == from && p->id == id) {
return true;
}

View File

@ -1868,7 +1868,7 @@ UserLicenseStatus NodeDB::getLicenseStatus(uint32_t nodeNum)
return info->user.is_licensed ? UserLicenseStatus::Licensed : UserLicenseStatus::NotLicensed;
}
bool NodeDB::checkLowEntropyPublicKey(const meshtastic_Config_SecurityConfig_public_key_t keyToTest)
bool NodeDB::checkLowEntropyPublicKey(const meshtastic_Config_SecurityConfig_public_key_t &keyToTest)
{
if (keyToTest.size == 32) {
uint8_t keyHash[32] = {0};

View File

@ -279,7 +279,7 @@ class NodeDB
bool hasValidPosition(const meshtastic_NodeInfoLite *n);
bool checkLowEntropyPublicKey(const meshtastic_Config_SecurityConfig_public_key_t keyToTest);
bool checkLowEntropyPublicKey(const meshtastic_Config_SecurityConfig_public_key_t &keyToTest);
bool backupPreferences(meshtastic_AdminMessage_BackupLocation location);
bool restorePreferences(meshtastic_AdminMessage_BackupLocation location,

View File

@ -181,7 +181,7 @@ PacketHistory::PacketRecord *PacketHistory::find(NodeNum sender, PacketId id)
}
/** Insert/Replace oldest PacketRecord in recentPackets. */
void PacketHistory::insert(PacketRecord &r)
void PacketHistory::insert(const PacketRecord &r)
{
uint32_t now_millis = millis(); // Should not jump with time changes
uint32_t OldtrxTimeMsec = 0;
@ -308,7 +308,7 @@ bool PacketHistory::wasRelayer(const uint8_t relayer, const uint32_t id, const N
return false;
}
PacketRecord *found = find(sender, id);
const PacketRecord *found = find(sender, id);
if (found == NULL) {
#if VERBOSE_PACKET_HISTORY
@ -327,7 +327,7 @@ bool PacketHistory::wasRelayer(const uint8_t relayer, const uint32_t id, const N
/* Check if a certain node was a relayer of a packet in the history given iterator
* @return true if node was indeed a relayer, false if not */
bool PacketHistory::wasRelayer(const uint8_t relayer, PacketRecord &r)
bool PacketHistory::wasRelayer(const uint8_t relayer, const PacketRecord &r)
{
for (uint8_t i = 0; i < NUM_RELAYERS; i++) {
if (r.relayed_by[i] == relayer) {

View File

@ -31,11 +31,11 @@ class PacketHistory
/** Insert/Replace oldest PacketRecord in mx_recentPackets.
* @param r PacketRecord to insert or replace */
void insert(PacketRecord &r); // Insert or replace a packet record in the history
void insert(const PacketRecord &r); // Insert or replace a packet record in the history
/* Check if a certain node was a relayer of a packet in the history given iterator
* @return true if node was indeed a relayer, false if not */
bool wasRelayer(const uint8_t relayer, PacketRecord &r);
bool wasRelayer(const uint8_t relayer, const PacketRecord &r);
PacketHistory(const PacketHistory &); // non construction-copyable
PacketHistory &operator=(const PacketHistory &); // non copyable

View File

@ -68,6 +68,9 @@ static int32_t reconnectETH()
initApiServer();
}
#endif
if (udpHandler && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {
udpHandler->start();
}
ethStartupComplete = true;
}

View File

@ -2,7 +2,6 @@
#include "configuration.h"
#include <Arduino.h>
#include <functional>
bool initEthernet();
bool isEthernetAvailable();

View File

@ -4,8 +4,13 @@
#include "main.h"
#include "mesh/Router.h"
#include <AsyncUDP.h>
#if HAS_ETHERNET && defined(ARCH_NRF52)
#include "mesh/eth/ethClient.h"
#else
#include <WiFi.h>
#endif
#include <AsyncUDP.h>
#if HAS_ETHERNET && defined(USE_WS5500)
#include <ETHClass2.h>
@ -22,11 +27,11 @@ class UdpMulticastHandler final
void start()
{
if (udp.listenMulticast(udpIpAddress, UDP_MULTICAST_DEFAUL_PORT, 64)) {
#ifndef ARCH_PORTDUINO
// FIXME(PORTDUINO): arduino lacks IPAddress::toString()
LOG_DEBUG("UDP Listening on IP: %s", WiFi.localIP().toString().c_str());
#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO)
LOG_DEBUG("UDP Listening on IP: %u.%u.%u.%u:%u", udpIpAddress[0], udpIpAddress[1], udpIpAddress[2], udpIpAddress[3],
UDP_MULTICAST_DEFAUL_PORT);
#else
LOG_DEBUG("UDP Listening");
LOG_DEBUG("UDP Listening on IP: %s", WiFi.localIP().toString().c_str());
#endif
udp.onPacket([this](AsyncUDPPacket packet) { onReceive(packet); });
} else {
@ -37,7 +42,10 @@ class UdpMulticastHandler final
void onReceive(AsyncUDPPacket packet)
{
size_t packetLength = packet.length();
#ifndef ARCH_PORTDUINO
#if defined(ARCH_NRF52)
IPAddress ip = packet.remoteIP();
LOG_DEBUG("UDP broadcast from: %u.%u.%u.%u, len=%u", ip[0], ip[1], ip[2], ip[3], packetLength);
#elif !defined(ARCH_PORTDUINO)
// FIXME(PORTDUINO): arduino lacks IPAddress::toString()
LOG_DEBUG("UDP broadcast from: %s, len=%u", packet.remoteIP().toString().c_str(), packetLength);
#endif
@ -61,7 +69,11 @@ class UdpMulticastHandler final
if (!mp || !udp) {
return false;
}
#ifndef ARCH_PORTDUINO
#if defined(ARCH_NRF52)
if (!isEthernetAvailable()) {
return false;
}
#elif !defined(ARCH_PORTDUINO)
if (WiFi.status() != WL_CONNECTED) {
return false;
}

View File

@ -1447,7 +1447,7 @@ void CannedMessageModule::drawEmotePickerScreen(OLEDDisplay *display, OLEDDispla
int headerY = y;
int listTop = headerY + headerFontHeight + headerMargin;
int visibleRows = (display->getHeight() - listTop - 2) / rowHeight;
int _visibleRows = (display->getHeight() - listTop - 2) / rowHeight;
int numEmotes = graphics::numEmotes;
// Clamp highlight index
@ -1457,11 +1457,11 @@ void CannedMessageModule::drawEmotePickerScreen(OLEDDisplay *display, OLEDDispla
emotePickerIndex = numEmotes - 1;
// Determine which emote is at the top
int topIndex = emotePickerIndex - visibleRows / 2;
int topIndex = emotePickerIndex - _visibleRows / 2;
if (topIndex < 0)
topIndex = 0;
if (topIndex > numEmotes - visibleRows)
topIndex = std::max(0, numEmotes - visibleRows);
if (topIndex > numEmotes - _visibleRows)
topIndex = std::max(0, numEmotes - _visibleRows);
// Draw header/title
display->setFont(FONT_SMALL);
@ -1709,7 +1709,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
} else {
// Text: split by words and wrap inside word if needed
String text = token.second;
uint16_t pos = 0;
pos = 0;
while (pos < text.length()) {
// Find next space (or end)
int spacePos = text.indexOf(' ', pos);
@ -1753,7 +1753,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
int yLine = inputY;
for (auto &line : lines) {
int nextX = x;
for (auto &token : line) {
for (const auto &token : line) {
if (token.first) {
const graphics::Emote *emote = nullptr;
for (int j = 0; j < graphics::numEmotes; j++) {
@ -1789,19 +1789,20 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
int topMsg;
std::vector<int> rowHeights;
int visibleRows;
int _visibleRows;
// Draw header (To: ...)
drawHeader(display, x, y, buffer);
// Shift message list upward by 3 pixels to reduce spacing between header and first message
const int listYOffset = y + FONT_HEIGHT_SMALL - 3;
visibleRows = (display->getHeight() - listYOffset) / baseRowSpacing;
_visibleRows = (display->getHeight() - listYOffset) / baseRowSpacing;
// Figure out which messages are visible and their needed heights
topMsg =
(messagesCount > visibleRows && currentMessageIndex >= visibleRows - 1) ? currentMessageIndex - visibleRows + 2 : 0;
int countRows = std::min(messagesCount, visibleRows);
topMsg = (messagesCount > _visibleRows && currentMessageIndex >= _visibleRows - 1)
? currentMessageIndex - _visibleRows + 2
: 0;
int countRows = std::min(messagesCount, _visibleRows);
// --- Build per-row max height based on all emotes in line ---
for (int i = 0; i < countRows; i++) {
@ -1828,7 +1829,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
int lineY = yCursor;
const char *msg = getMessageByIndex(msgIdx);
int rowHeight = rowHeights[vis];
bool highlight = (msgIdx == currentMessageIndex);
bool _highlight = (msgIdx == currentMessageIndex);
// --- Multi-emote tokenization ---
std::vector<std::pair<bool, String>> tokens; // (isEmote, token)
@ -1881,20 +1882,20 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
int textYOffset = (rowHeight - FONT_HEIGHT_SMALL) / 2;
#ifdef USE_EINK
int nextX = x + (highlight ? 12 : 0);
if (highlight)
int nextX = x + (_highlight ? 12 : 0);
if (_highlight)
display->drawString(x + 0, lineY + textYOffset, ">");
#else
int scrollPadding = 8;
if (highlight) {
if (_highlight) {
display->fillRect(x + 0, lineY, display->getWidth() - scrollPadding, rowHeight);
display->setColor(BLACK);
}
int nextX = x + (highlight ? 2 : 0);
int nextX = x + (_highlight ? 2 : 0);
#endif
// Draw all tokens left to right
for (auto &token : tokens) {
for (const auto &token : tokens) {
if (token.first) {
// Emote
const graphics::Emote *emote = nullptr;
@ -1916,7 +1917,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
}
}
#ifndef USE_EINK
if (highlight)
if (_highlight)
display->setColor(WHITE);
#endif
@ -1924,11 +1925,11 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
}
// Scrollbar
if (messagesCount > visibleRows) {
if (messagesCount > _visibleRows) {
int scrollHeight = display->getHeight() - listYOffset;
int scrollTrackX = display->getWidth() - 6;
display->drawRect(scrollTrackX, listYOffset, 4, scrollHeight);
int barHeight = (scrollHeight * visibleRows) / messagesCount;
int barHeight = (scrollHeight * _visibleRows) / messagesCount;
int scrollPos = listYOffset + (scrollHeight * topMsg) / messagesCount;
display->fillRect(scrollTrackX, scrollPos, 4, barHeight);
}

View File

@ -0,0 +1,69 @@
#include "AsyncUDP.h"
AsyncUDP::AsyncUDP() : OSThread("AsyncUDP"), localPort(0) {}
bool AsyncUDP::listenMulticast(IPAddress multicastIP, uint16_t port, uint8_t ttl)
{
if (!isMulticast(multicastIP))
return false;
localPort = port;
udp.beginMulticast(multicastIP, port);
return true;
}
size_t AsyncUDP::write(uint8_t b)
{
return udp.write(&b, 1);
}
size_t AsyncUDP::write(const uint8_t *data, size_t len)
{
return udp.write(data, len);
}
void AsyncUDP::onPacket(const std::function<void(AsyncUDPPacket)> &callback)
{
_onPacket = callback;
}
bool AsyncUDP::writeTo(const uint8_t *data, size_t len, IPAddress ip, uint16_t port)
{
if (!udp.beginPacket(ip, port))
return false;
udp.write(data, len);
return udp.endPacket();
}
// AsyncUDPPacket
AsyncUDPPacket::AsyncUDPPacket(EthernetUDP &source) : _udp(source), _remoteIP(source.remoteIP()), _remotePort(source.remotePort())
{
if (_udp.available() > 0) {
_readLength = _udp.read(_buffer, sizeof(_buffer));
} else {
_readLength = 0;
}
}
IPAddress AsyncUDPPacket::remoteIP()
{
return _remoteIP;
}
uint16_t AsyncUDPPacket::length()
{
return _readLength;
}
const uint8_t *AsyncUDPPacket::data()
{
return _buffer;
}
int32_t AsyncUDP::runOnce()
{
if (_onPacket && udp.parsePacket() > 0) {
AsyncUDPPacket packet(udp);
_onPacket(packet);
}
return 5; // check every 5ms
}

View File

@ -0,0 +1,57 @@
#ifndef ASYNC_UDP_H
#define ASYNC_UDP_H
#include "concurrency/OSThread.h"
#include <IPAddress.h>
#include <Print.h>
#include <RAK13800_W5100S.h>
#include <cstdint>
#include <functional>
class AsyncUDPPacket;
class AsyncUDP : public Print, private concurrency::OSThread
{
public:
AsyncUDP();
explicit operator bool() const { return localPort != 0; }
bool listenMulticast(IPAddress multicastIP, uint16_t port, uint8_t ttl = 64);
bool writeTo(const uint8_t *data, size_t len, IPAddress ip, uint16_t port);
size_t write(uint8_t b) override;
size_t write(const uint8_t *data, size_t len) override;
void onPacket(const std::function<void(AsyncUDPPacket)> &callback);
private:
EthernetUDP udp;
uint16_t localPort;
std::function<void(AsyncUDPPacket)> _onPacket;
virtual int32_t runOnce() override;
};
class AsyncUDPPacket
{
public:
AsyncUDPPacket(EthernetUDP &source);
IPAddress remoteIP();
uint16_t length();
const uint8_t *data();
private:
EthernetUDP &_udp;
IPAddress _remoteIP;
uint16_t _remotePort;
size_t _readLength = 0;
static constexpr size_t BUF_SIZE = 512;
uint8_t _buffer[BUF_SIZE];
};
inline bool isMulticast(const IPAddress &ip)
{
return (ip[0] & 0xF0) == 0xE0;
}
#endif // ASYNC_UDP_H

View File

@ -5,6 +5,7 @@ board = wiscore_rak4631
board_check = true
build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_eth_gw -D RAK_4631
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
-DHAS_UDP_MULTICAST=1
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
-DEINK_WIDTH=250
-DEINK_HEIGHT=122

View File

@ -2,13 +2,13 @@
extends = rp2040_base
board = rpipico
upload_protocol = picotool
build_flags = ${rp2040_base.build_flags}
-DRPI_PICO
-Ivariants/ec_catsniffer
-DDEBUG_RP2040_PORT=Serial
# -DHW_SPI1_DEVICE
build_flags =
${rp2040_base.build_flags}
-D RPI_PICO
-I variants/rp2040/ec_catsniffer
-D DEBUG_RP2040_PORT=Serial
; -D HW_SPI1_DEVICE
lib_deps =
${rp2040_base.lib_deps}
debug_build_flags = ${rp2040_base.build_flags}, -g
debug_tool = cmsis-dap
debug_tool = cmsis-dap

View File

@ -2,14 +2,14 @@
extends = rp2040_base
board = adafruit_feather
upload_protocol = picotool
# add our variants files to the include and src paths
build_flags = ${rp2040_base.build_flags}
-DRP2040_FEATHER_RFM95
-Ivariants/feather_rp2040_rfm95
-DDEBUG_RP2040_PORT=Serial
-DHW_SPI1_DEVICE
build_flags =
${rp2040_base.build_flags}
-D RP2040_FEATHER_RFM95
-I variants/rp2040/feather_rp2040_rfm95
-D DEBUG_RP2040_PORT=Serial
-D HW_SPI1_DEVICE
lib_deps =
${rp2040_base.lib_deps}
debug_build_flags = ${rp2040_base.build_flags}
debug_tool = cmsis-dap ; for e.g. Picotool
debug_tool = cmsis-dap ; for e.g. Picotool

View File

@ -3,14 +3,14 @@ extends = rp2040_base
board = rpipico
board_level = extra
upload_protocol = picotool
# add our variants files to the include and src paths
build_flags = ${rp2040_base.build_flags}
-DPRIVATE_HW
-Ivariants/nibble_rp2040
-DDEBUG_RP2040_PORT=Serial
-DHW_SPI1_DEVICE
build_flags =
${rp2040_base.build_flags}
-D PRIVATE_HW
-I variants/rp2040/nibble_rp2040
-D DEBUG_RP2040_PORT=Serial
-D HW_SPI1_DEVICE
lib_deps =
${rp2040_base.lib_deps}
debug_build_flags = ${rp2040_base.build_flags}, -g
debug_tool = cmsis-dap ; for e.g. Picotool
debug_tool = cmsis-dap ; for e.g. Picotool

View File

@ -2,18 +2,18 @@
extends = rp2040_base
board = rakwireless_rak11300
upload_protocol = picotool
# add our variants files to the include and src paths
build_flags = ${rp2040_base.build_flags}
-DRAK11310
-Ivariants/rak11310
-DDEBUG_RP2040_PORT=Serial
-DRV3028_RTC=0x52
build_src_filter = ${rp2040_base.build_src_filter} +<../variants/rak11310> +<mesh/eth/> +<mesh/api/> +<mqtt/>
build_flags =
${rp2040_base.build_flags}
-D RAK11310
-I variants/rp2040/rak11310
-D DEBUG_RP2040_PORT=Serial
-D RV3028_RTC=0x52
build_src_filter = ${rp2040_base.build_src_filter} +<../variants/rp2040/rak11310> +<mesh/eth/> +<mesh/api/> +<mqtt/>
lib_deps =
${rp2040_base.lib_deps}
${networking_base.lib_deps}
melopero/Melopero RV3028@^1.1.0
https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip
debug_build_flags = ${rp2040_base.build_flags}, -g
debug_tool = cmsis-dap ; for e.g. Picotool
debug_tool = cmsis-dap ; for e.g. Picotool

View File

@ -2,14 +2,14 @@
extends = rp2040_base
board = rpipico
upload_protocol = picotool
# add our variants files to the include and src paths
build_flags = ${rp2040_base.build_flags}
-DRP2040_LORA
-Ivariants/rp2040-lora
-DDEBUG_RP2040_PORT=Serial
-DHW_SPI1_DEVICE
build_flags =
${rp2040_base.build_flags}
-D RP2040_LORA
-I variants/rp2040/rp2040-lora
-D DEBUG_RP2040_PORT=Serial
-D HW_SPI1_DEVICE
lib_deps =
${rp2040_base.lib_deps}
debug_build_flags = ${rp2040_base.build_flags}, -g
debug_tool = cmsis-dap ; for e.g. Picotool
debug_tool = cmsis-dap ; for e.g. Picotool

View File

@ -12,11 +12,11 @@ debug_init_cmds =
$LOAD_CMDS
monitor init
monitor reset halt
# add our variants files to the include and src paths
build_flags = ${rp2040_base.build_flags}
build_flags =
${rp2040_base.build_flags}
-DRPI_PICO
-Ivariants/rpipico-slowclock
-Ivariants/rp2040/rpipico-slowclock
-DDEBUG_RP2040_PORT=Serial2
-DHW_SPI1_DEVICE
-g
@ -25,4 +25,4 @@ lib_deps =
${rp2040_base.lib_deps}
debug_build_flags = ${rp2040_base.build_flags}
-g
-DNO_USB
-DNO_USB

View File

@ -4,12 +4,13 @@ board = rpipico
upload_protocol = picotool
# add our variants files to the include and src paths
build_flags = ${rp2040_base.build_flags}
-DRPI_PICO
-Ivariants/rpipico
-DDEBUG_RP2040_PORT=Serial
-DHW_SPI1_DEVICE
build_flags =
${rp2040_base.build_flags}
-D RPI_PICO
-I variants/rp2040/rpipico
-D DEBUG_RP2040_PORT=Serial
-D HW_SPI1_DEVICE
lib_deps =
${rp2040_base.lib_deps}
debug_build_flags = ${rp2040_base.build_flags}, -g
debug_tool = cmsis-dap ; for e.g. Picotool
debug_tool = cmsis-dap ; for e.g. Picotool

View File

@ -2,14 +2,14 @@
extends = rp2040_base
board = rpipicow
upload_protocol = picotool
# add our variants files to the include and src paths
build_flags = ${rp2040_base.build_flags}
-DRPI_PICO
-Ivariants/rpipicow
-DHW_SPI1_DEVICE
build_flags =
${rp2040_base.build_flags}
-D RPI_PICO
-I variants/rp2040/rpipicow
-D HW_SPI1_DEVICE
-D HAS_UDP_MULTICAST=1
-fexceptions # for exception handling in MQTT
-DHAS_UDP_MULTICAST=1
build_src_filter = ${rp2040_base.build_src_filter} +<mesh/wifi/>
lib_deps =
${rp2040_base.lib_deps}

View File

@ -5,9 +5,9 @@ board = rpipico
upload_protocol = picotool
# add our variants files to the include and src paths
build_flags = ${rp2040_base.build_flags}
-DSENSELORA_RP2040
-Ivariants/senselora_rp2040
-DDEBUG_RP2040_PORT=Serial
build_flags = ${rp2040_base.build_flags}
-D SENSELORA_RP2040
-I variants/rp2040/senselora_rp2040
-D DEBUG_RP2040_PORT=Serial
lib_deps =
${rp2040_base.lib_deps}

View File

@ -6,6 +6,7 @@
#define BUTTON_NEED_PULLUP
#define LED_PIN PIN_LED
#define ledOff(pin) pinMode(pin, INPUT)
#undef BATTERY_PIN
#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION

View File

@ -4,12 +4,13 @@ board = rpipico2
upload_protocol = picotool
# add our variants files to the include and src paths
build_flags = ${rp2350_base.build_flags}
-DRPI_PICO2
-Ivariants/rpipico2
-DDEBUG_RP2040_PORT=Serial
-DHW_SPI1_DEVICE
build_flags =
${rp2350_base.build_flags}
-D RPI_PICO2
-I variants/rp2350/rpipico2
-D DEBUG_RP2040_PORT=Serial
-D HW_SPI1_DEVICE
lib_deps =
${rp2350_base.lib_deps}
debug_build_flags = ${rp2350_base.build_flags}, -g
debug_tool = cmsis-dap ; for e.g. Picotool
debug_tool = cmsis-dap ; for e.g. Picotool

View File

@ -13,9 +13,10 @@ debug_init_cmds =
monitor reset halt
# add our variants files to the include and src paths
build_flags = ${rp2350_base.build_flags}
build_flags =
${rp2350_base.build_flags}
-DRPI_PICO2
-Ivariants/rpipico2w
-Ivariants/rp2350/rpipico2w
# -DDEBUG_RP2040_PORT=Serial
-DHW_SPI1_DEVICE
-DARDUINO_RASPBERRY_PI_PICO_2W

View File

@ -5,7 +5,7 @@ board_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem
board_level = extra
build_flags =
${stm32_base.build_flags}
-Ivariants/CDEBYTE_E77-MBL
-Ivariants/stm32/CDEBYTE_E77-MBL
-DSERIAL_UART_INSTANCE=1
-DPIN_SERIAL_RX=PA3
-DPIN_SERIAL_TX=PA2

View File

@ -4,7 +4,7 @@ board = wiscore_rak3172
board_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem
build_flags =
${stm32_base.build_flags}
-Ivariants/rak3172
-Ivariants/stm32/rak3172
-DPIN_WIRE_SDA=PA11
-DPIN_WIRE_SCL=PA12
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1

View File

@ -4,7 +4,7 @@ board = lora_e5_dev_board
board_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem
build_flags =
${stm32_base.build_flags}
-Ivariants/wio-e5
-Ivariants/stm32/wio-e5
-DSERIAL_UART_INSTANCE=1
-DPIN_SERIAL_RX=PB7
-DPIN_SERIAL_TX=PB6

View File

@ -6,6 +6,7 @@ board_build.partitions = default_16MB.csv
build_flags =
${esp32s3_base.build_flags}
-D T_ETH_ELITE
-D HAS_UDP_MULTICAST=1
-I variants/t-eth-elite
-D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.