mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 02:45:41 +00:00
Merge branch 'master' into dismiss_frames
This commit is contained in:
commit
efdd24bc7b
@ -8,15 +8,15 @@ plugins:
|
|||||||
uri: https://github.com/trunk-io/plugins
|
uri: https://github.com/trunk-io/plugins
|
||||||
lint:
|
lint:
|
||||||
enabled:
|
enabled:
|
||||||
- checkov@3.2.450
|
- checkov@3.2.451
|
||||||
- renovate@41.30.5
|
- renovate@41.37.9
|
||||||
- prettier@3.6.2
|
- prettier@3.6.2
|
||||||
- trufflehog@3.89.2
|
- trufflehog@3.90.0
|
||||||
- yamllint@1.37.1
|
- yamllint@1.37.1
|
||||||
- bandit@1.8.6
|
- bandit@1.8.6
|
||||||
- trivy@0.64.1
|
- trivy@0.64.1
|
||||||
- taplo@0.9.3
|
- taplo@0.9.3
|
||||||
- ruff@0.12.2
|
- ruff@0.12.3
|
||||||
- isort@6.0.1
|
- isort@6.0.1
|
||||||
- markdownlint@0.45.0
|
- markdownlint@0.45.0
|
||||||
- oxipng@9.1.5
|
- oxipng@9.1.5
|
||||||
|
@ -39,7 +39,7 @@ build_flags =
|
|||||||
-Isrc/platform/portduino
|
-Isrc/platform/portduino
|
||||||
-DRADIOLIB_EEPROM_UNSUPPORTED
|
-DRADIOLIB_EEPROM_UNSUPPORTED
|
||||||
-DPORTDUINO_LINUX_HARDWARE
|
-DPORTDUINO_LINUX_HARDWARE
|
||||||
-DHAS_UDP_MULTICAST
|
-DHAS_UDP_MULTICAST=1
|
||||||
-lpthread
|
-lpthread
|
||||||
-lstdc++fs
|
-lstdc++fs
|
||||||
-lbluetooth
|
-lbluetooth
|
||||||
|
@ -69,10 +69,7 @@ int32_t BuzzerFeedbackThread::runOnce()
|
|||||||
// This thread is primarily event-driven, but we can use runOnce
|
// This thread is primarily event-driven, but we can use runOnce
|
||||||
// for any periodic tasks if needed in the future
|
// for any periodic tasks if needed in the future
|
||||||
|
|
||||||
if (needsUpdate) {
|
needsUpdate = false;
|
||||||
needsUpdate = false;
|
|
||||||
// Could add any periodic processing here
|
|
||||||
}
|
|
||||||
|
|
||||||
// Run every 100ms when active, less frequently when idle
|
// Run every 100ms when active, less frequently when idle
|
||||||
return needsUpdate ? 100 : 1000;
|
return needsUpdate ? 100 : 1000;
|
||||||
|
@ -1016,7 +1016,7 @@ void Screen::setFrames(FrameFocus focus)
|
|||||||
// Insert favorite frames *after* collecting them all
|
// Insert favorite frames *after* collecting them all
|
||||||
if (!favoriteFrames.empty()) {
|
if (!favoriteFrames.empty()) {
|
||||||
fsi.positions.firstFavorite = numframes;
|
fsi.positions.firstFavorite = numframes;
|
||||||
for (auto &f : favoriteFrames) {
|
for (const auto &f : favoriteFrames) {
|
||||||
normalFrames[numframes++] = f;
|
normalFrames[numframes++] = f;
|
||||||
indicatorIcons.push_back(icon_node);
|
indicatorIcons.push_back(icon_node);
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,6 @@ void drawDigitalClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int1
|
|||||||
hour %= 12;
|
hour %= 12;
|
||||||
if (hour == 0)
|
if (hour == 0)
|
||||||
hour = 12;
|
hour = 12;
|
||||||
bool isPM = hour >= 12;
|
|
||||||
snprintf(timeString, sizeof(timeString), "%d:%02d", hour, minute);
|
snprintf(timeString, sizeof(timeString), "%d:%02d", hour, minute);
|
||||||
} else {
|
} else {
|
||||||
snprintf(timeString, sizeof(timeString), "%02d:%02d", hour, minute);
|
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
|
// hour hand radius and y coordinate
|
||||||
int16_t hourHandRadius = radius * 0.35;
|
int16_t hourHandRadius = radius * 0.35;
|
||||||
if (isHighResolution) {
|
|
||||||
int16_t hourHandRadius = radius * 0.55;
|
|
||||||
}
|
|
||||||
int16_t hourHandNoonY = centerY - hourHandRadius;
|
int16_t hourHandNoonY = centerY - hourHandRadius;
|
||||||
|
|
||||||
display->setColor(OLEDDISPLAY_COLOR::WHITE);
|
display->setColor(OLEDDISPLAY_COLOR::WHITE);
|
||||||
@ -386,7 +382,7 @@ void drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
|
|
||||||
bool isPM = hour >= 12;
|
bool isPM = hour >= 12;
|
||||||
if (config.display.use_12h_clock) {
|
if (config.display.use_12h_clock) {
|
||||||
bool isPM = hour >= 12;
|
isPM = hour >= 12;
|
||||||
display->setFont(FONT_SMALL);
|
display->setFont(FONT_SMALL);
|
||||||
int yOffset = isHighResolution ? 1 : 0;
|
int yOffset = isHighResolution ? 1 : 0;
|
||||||
#ifdef USE_EINK
|
#ifdef USE_EINK
|
||||||
|
@ -24,7 +24,7 @@ struct ButtonConfig {
|
|||||||
bool touchQuirk = false;
|
bool touchQuirk = false;
|
||||||
|
|
||||||
// Constructor to set required parameter
|
// Constructor to set required parameter
|
||||||
ButtonConfig(uint8_t pin = 0) : pinNumber(pin) {}
|
explicit ButtonConfig(uint8_t pin = 0) : pinNumber(pin) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef BUTTON_CLICK_MS
|
#ifndef BUTTON_CLICK_MS
|
||||||
@ -62,7 +62,7 @@ class ButtonThread : public Observable<const InputEvent *>, public concurrency::
|
|||||||
BUTTON_EVENT_COMBO_SHORT_LONG,
|
BUTTON_EVENT_COMBO_SHORT_LONG,
|
||||||
};
|
};
|
||||||
|
|
||||||
ButtonThread(const char *name);
|
explicit ButtonThread(const char *name);
|
||||||
int32_t runOnce() override;
|
int32_t runOnce() override;
|
||||||
OneButton userButton;
|
OneButton userButton;
|
||||||
void attachButtonInterrupts();
|
void attachButtonInterrupts();
|
||||||
|
@ -121,7 +121,7 @@ meshtastic_MeshPacket *MeshPacketQueue::remove(NodeNum from, PacketId id, bool t
|
|||||||
bool MeshPacketQueue::find(const NodeNum from, const PacketId id)
|
bool MeshPacketQueue::find(const NodeNum from, const PacketId id)
|
||||||
{
|
{
|
||||||
for (auto it = queue.begin(); it != queue.end(); it++) {
|
for (auto it = queue.begin(); it != queue.end(); it++) {
|
||||||
const auto p = (*it);
|
const auto *p = *it;
|
||||||
if (getFrom(p) == from && p->id == id) {
|
if (getFrom(p) == from && p->id == id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1868,7 +1868,7 @@ UserLicenseStatus NodeDB::getLicenseStatus(uint32_t nodeNum)
|
|||||||
return info->user.is_licensed ? UserLicenseStatus::Licensed : UserLicenseStatus::NotLicensed;
|
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) {
|
if (keyToTest.size == 32) {
|
||||||
uint8_t keyHash[32] = {0};
|
uint8_t keyHash[32] = {0};
|
||||||
|
@ -279,7 +279,7 @@ class NodeDB
|
|||||||
|
|
||||||
bool hasValidPosition(const meshtastic_NodeInfoLite *n);
|
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 backupPreferences(meshtastic_AdminMessage_BackupLocation location);
|
||||||
bool restorePreferences(meshtastic_AdminMessage_BackupLocation location,
|
bool restorePreferences(meshtastic_AdminMessage_BackupLocation location,
|
||||||
|
@ -181,7 +181,7 @@ PacketHistory::PacketRecord *PacketHistory::find(NodeNum sender, PacketId id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Insert/Replace oldest PacketRecord in recentPackets. */
|
/** 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 now_millis = millis(); // Should not jump with time changes
|
||||||
uint32_t OldtrxTimeMsec = 0;
|
uint32_t OldtrxTimeMsec = 0;
|
||||||
@ -308,7 +308,7 @@ bool PacketHistory::wasRelayer(const uint8_t relayer, const uint32_t id, const N
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketRecord *found = find(sender, id);
|
const PacketRecord *found = find(sender, id);
|
||||||
|
|
||||||
if (found == NULL) {
|
if (found == NULL) {
|
||||||
#if VERBOSE_PACKET_HISTORY
|
#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
|
/* 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 */
|
* @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++) {
|
for (uint8_t i = 0; i < NUM_RELAYERS; i++) {
|
||||||
if (r.relayed_by[i] == relayer) {
|
if (r.relayed_by[i] == relayer) {
|
||||||
|
@ -31,11 +31,11 @@ class PacketHistory
|
|||||||
|
|
||||||
/** Insert/Replace oldest PacketRecord in mx_recentPackets.
|
/** Insert/Replace oldest PacketRecord in mx_recentPackets.
|
||||||
* @param r PacketRecord to insert or replace */
|
* @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
|
/* 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 */
|
* @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(const PacketHistory &); // non construction-copyable
|
||||||
PacketHistory &operator=(const PacketHistory &); // non copyable
|
PacketHistory &operator=(const PacketHistory &); // non copyable
|
||||||
|
@ -68,6 +68,9 @@ static int32_t reconnectETH()
|
|||||||
initApiServer();
|
initApiServer();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (udpHandler && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {
|
||||||
|
udpHandler->start();
|
||||||
|
}
|
||||||
|
|
||||||
ethStartupComplete = true;
|
ethStartupComplete = true;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <functional>
|
|
||||||
|
|
||||||
bool initEthernet();
|
bool initEthernet();
|
||||||
bool isEthernetAvailable();
|
bool isEthernetAvailable();
|
||||||
|
@ -4,8 +4,13 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "mesh/Router.h"
|
#include "mesh/Router.h"
|
||||||
|
|
||||||
#include <AsyncUDP.h>
|
#if HAS_ETHERNET && defined(ARCH_NRF52)
|
||||||
|
#include "mesh/eth/ethClient.h"
|
||||||
|
#else
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <AsyncUDP.h>
|
||||||
|
|
||||||
#if HAS_ETHERNET && defined(USE_WS5500)
|
#if HAS_ETHERNET && defined(USE_WS5500)
|
||||||
#include <ETHClass2.h>
|
#include <ETHClass2.h>
|
||||||
@ -22,11 +27,11 @@ class UdpMulticastHandler final
|
|||||||
void start()
|
void start()
|
||||||
{
|
{
|
||||||
if (udp.listenMulticast(udpIpAddress, UDP_MULTICAST_DEFAUL_PORT, 64)) {
|
if (udp.listenMulticast(udpIpAddress, UDP_MULTICAST_DEFAUL_PORT, 64)) {
|
||||||
#ifndef ARCH_PORTDUINO
|
#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO)
|
||||||
// FIXME(PORTDUINO): arduino lacks IPAddress::toString()
|
LOG_DEBUG("UDP Listening on IP: %u.%u.%u.%u:%u", udpIpAddress[0], udpIpAddress[1], udpIpAddress[2], udpIpAddress[3],
|
||||||
LOG_DEBUG("UDP Listening on IP: %s", WiFi.localIP().toString().c_str());
|
UDP_MULTICAST_DEFAUL_PORT);
|
||||||
#else
|
#else
|
||||||
LOG_DEBUG("UDP Listening");
|
LOG_DEBUG("UDP Listening on IP: %s", WiFi.localIP().toString().c_str());
|
||||||
#endif
|
#endif
|
||||||
udp.onPacket([this](AsyncUDPPacket packet) { onReceive(packet); });
|
udp.onPacket([this](AsyncUDPPacket packet) { onReceive(packet); });
|
||||||
} else {
|
} else {
|
||||||
@ -37,7 +42,10 @@ class UdpMulticastHandler final
|
|||||||
void onReceive(AsyncUDPPacket packet)
|
void onReceive(AsyncUDPPacket packet)
|
||||||
{
|
{
|
||||||
size_t packetLength = packet.length();
|
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()
|
// FIXME(PORTDUINO): arduino lacks IPAddress::toString()
|
||||||
LOG_DEBUG("UDP broadcast from: %s, len=%u", packet.remoteIP().toString().c_str(), packetLength);
|
LOG_DEBUG("UDP broadcast from: %s, len=%u", packet.remoteIP().toString().c_str(), packetLength);
|
||||||
#endif
|
#endif
|
||||||
@ -61,7 +69,11 @@ class UdpMulticastHandler final
|
|||||||
if (!mp || !udp) {
|
if (!mp || !udp) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifndef ARCH_PORTDUINO
|
#if defined(ARCH_NRF52)
|
||||||
|
if (!isEthernetAvailable()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#elif !defined(ARCH_PORTDUINO)
|
||||||
if (WiFi.status() != WL_CONNECTED) {
|
if (WiFi.status() != WL_CONNECTED) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1447,7 +1447,7 @@ void CannedMessageModule::drawEmotePickerScreen(OLEDDisplay *display, OLEDDispla
|
|||||||
int headerY = y;
|
int headerY = y;
|
||||||
int listTop = headerY + headerFontHeight + headerMargin;
|
int listTop = headerY + headerFontHeight + headerMargin;
|
||||||
|
|
||||||
int visibleRows = (display->getHeight() - listTop - 2) / rowHeight;
|
int _visibleRows = (display->getHeight() - listTop - 2) / rowHeight;
|
||||||
int numEmotes = graphics::numEmotes;
|
int numEmotes = graphics::numEmotes;
|
||||||
|
|
||||||
// Clamp highlight index
|
// Clamp highlight index
|
||||||
@ -1457,11 +1457,11 @@ void CannedMessageModule::drawEmotePickerScreen(OLEDDisplay *display, OLEDDispla
|
|||||||
emotePickerIndex = numEmotes - 1;
|
emotePickerIndex = numEmotes - 1;
|
||||||
|
|
||||||
// Determine which emote is at the top
|
// Determine which emote is at the top
|
||||||
int topIndex = emotePickerIndex - visibleRows / 2;
|
int topIndex = emotePickerIndex - _visibleRows / 2;
|
||||||
if (topIndex < 0)
|
if (topIndex < 0)
|
||||||
topIndex = 0;
|
topIndex = 0;
|
||||||
if (topIndex > numEmotes - visibleRows)
|
if (topIndex > numEmotes - _visibleRows)
|
||||||
topIndex = std::max(0, numEmotes - visibleRows);
|
topIndex = std::max(0, numEmotes - _visibleRows);
|
||||||
|
|
||||||
// Draw header/title
|
// Draw header/title
|
||||||
display->setFont(FONT_SMALL);
|
display->setFont(FONT_SMALL);
|
||||||
@ -1709,7 +1709,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
|
|||||||
} else {
|
} else {
|
||||||
// Text: split by words and wrap inside word if needed
|
// Text: split by words and wrap inside word if needed
|
||||||
String text = token.second;
|
String text = token.second;
|
||||||
uint16_t pos = 0;
|
pos = 0;
|
||||||
while (pos < text.length()) {
|
while (pos < text.length()) {
|
||||||
// Find next space (or end)
|
// Find next space (or end)
|
||||||
int spacePos = text.indexOf(' ', pos);
|
int spacePos = text.indexOf(' ', pos);
|
||||||
@ -1753,7 +1753,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
|
|||||||
int yLine = inputY;
|
int yLine = inputY;
|
||||||
for (auto &line : lines) {
|
for (auto &line : lines) {
|
||||||
int nextX = x;
|
int nextX = x;
|
||||||
for (auto &token : line) {
|
for (const auto &token : line) {
|
||||||
if (token.first) {
|
if (token.first) {
|
||||||
const graphics::Emote *emote = nullptr;
|
const graphics::Emote *emote = nullptr;
|
||||||
for (int j = 0; j < graphics::numEmotes; j++) {
|
for (int j = 0; j < graphics::numEmotes; j++) {
|
||||||
@ -1789,19 +1789,20 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
|
|||||||
|
|
||||||
int topMsg;
|
int topMsg;
|
||||||
std::vector<int> rowHeights;
|
std::vector<int> rowHeights;
|
||||||
int visibleRows;
|
int _visibleRows;
|
||||||
|
|
||||||
// Draw header (To: ...)
|
// Draw header (To: ...)
|
||||||
drawHeader(display, x, y, buffer);
|
drawHeader(display, x, y, buffer);
|
||||||
|
|
||||||
// Shift message list upward by 3 pixels to reduce spacing between header and first message
|
// Shift message list upward by 3 pixels to reduce spacing between header and first message
|
||||||
const int listYOffset = y + FONT_HEIGHT_SMALL - 3;
|
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
|
// Figure out which messages are visible and their needed heights
|
||||||
topMsg =
|
topMsg = (messagesCount > _visibleRows && currentMessageIndex >= _visibleRows - 1)
|
||||||
(messagesCount > visibleRows && currentMessageIndex >= visibleRows - 1) ? currentMessageIndex - visibleRows + 2 : 0;
|
? currentMessageIndex - _visibleRows + 2
|
||||||
int countRows = std::min(messagesCount, visibleRows);
|
: 0;
|
||||||
|
int countRows = std::min(messagesCount, _visibleRows);
|
||||||
|
|
||||||
// --- Build per-row max height based on all emotes in line ---
|
// --- Build per-row max height based on all emotes in line ---
|
||||||
for (int i = 0; i < countRows; i++) {
|
for (int i = 0; i < countRows; i++) {
|
||||||
@ -1828,7 +1829,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
|
|||||||
int lineY = yCursor;
|
int lineY = yCursor;
|
||||||
const char *msg = getMessageByIndex(msgIdx);
|
const char *msg = getMessageByIndex(msgIdx);
|
||||||
int rowHeight = rowHeights[vis];
|
int rowHeight = rowHeights[vis];
|
||||||
bool highlight = (msgIdx == currentMessageIndex);
|
bool _highlight = (msgIdx == currentMessageIndex);
|
||||||
|
|
||||||
// --- Multi-emote tokenization ---
|
// --- Multi-emote tokenization ---
|
||||||
std::vector<std::pair<bool, String>> tokens; // (isEmote, token)
|
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;
|
int textYOffset = (rowHeight - FONT_HEIGHT_SMALL) / 2;
|
||||||
|
|
||||||
#ifdef USE_EINK
|
#ifdef USE_EINK
|
||||||
int nextX = x + (highlight ? 12 : 0);
|
int nextX = x + (_highlight ? 12 : 0);
|
||||||
if (highlight)
|
if (_highlight)
|
||||||
display->drawString(x + 0, lineY + textYOffset, ">");
|
display->drawString(x + 0, lineY + textYOffset, ">");
|
||||||
#else
|
#else
|
||||||
int scrollPadding = 8;
|
int scrollPadding = 8;
|
||||||
if (highlight) {
|
if (_highlight) {
|
||||||
display->fillRect(x + 0, lineY, display->getWidth() - scrollPadding, rowHeight);
|
display->fillRect(x + 0, lineY, display->getWidth() - scrollPadding, rowHeight);
|
||||||
display->setColor(BLACK);
|
display->setColor(BLACK);
|
||||||
}
|
}
|
||||||
int nextX = x + (highlight ? 2 : 0);
|
int nextX = x + (_highlight ? 2 : 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Draw all tokens left to right
|
// Draw all tokens left to right
|
||||||
for (auto &token : tokens) {
|
for (const auto &token : tokens) {
|
||||||
if (token.first) {
|
if (token.first) {
|
||||||
// Emote
|
// Emote
|
||||||
const graphics::Emote *emote = nullptr;
|
const graphics::Emote *emote = nullptr;
|
||||||
@ -1916,7 +1917,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef USE_EINK
|
#ifndef USE_EINK
|
||||||
if (highlight)
|
if (_highlight)
|
||||||
display->setColor(WHITE);
|
display->setColor(WHITE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1924,11 +1925,11 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Scrollbar
|
// Scrollbar
|
||||||
if (messagesCount > visibleRows) {
|
if (messagesCount > _visibleRows) {
|
||||||
int scrollHeight = display->getHeight() - listYOffset;
|
int scrollHeight = display->getHeight() - listYOffset;
|
||||||
int scrollTrackX = display->getWidth() - 6;
|
int scrollTrackX = display->getWidth() - 6;
|
||||||
display->drawRect(scrollTrackX, listYOffset, 4, scrollHeight);
|
display->drawRect(scrollTrackX, listYOffset, 4, scrollHeight);
|
||||||
int barHeight = (scrollHeight * visibleRows) / messagesCount;
|
int barHeight = (scrollHeight * _visibleRows) / messagesCount;
|
||||||
int scrollPos = listYOffset + (scrollHeight * topMsg) / messagesCount;
|
int scrollPos = listYOffset + (scrollHeight * topMsg) / messagesCount;
|
||||||
display->fillRect(scrollTrackX, scrollPos, 4, barHeight);
|
display->fillRect(scrollTrackX, scrollPos, 4, barHeight);
|
||||||
}
|
}
|
||||||
|
69
src/platform/nrf52/AsyncUDP.cpp
Normal file
69
src/platform/nrf52/AsyncUDP.cpp
Normal 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
|
||||||
|
}
|
57
src/platform/nrf52/AsyncUDP.h
Normal file
57
src/platform/nrf52/AsyncUDP.h
Normal 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
|
@ -5,6 +5,7 @@ board = wiscore_rak4631
|
|||||||
board_check = true
|
board_check = true
|
||||||
build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_eth_gw -D RAK_4631
|
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.
|
-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_DISPLAY_MODEL=GxEPD2_213_BN
|
||||||
-DEINK_WIDTH=250
|
-DEINK_WIDTH=250
|
||||||
-DEINK_HEIGHT=122
|
-DEINK_HEIGHT=122
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
extends = rp2040_base
|
extends = rp2040_base
|
||||||
board = rpipico
|
board = rpipico
|
||||||
upload_protocol = picotool
|
upload_protocol = picotool
|
||||||
|
build_flags =
|
||||||
build_flags = ${rp2040_base.build_flags}
|
${rp2040_base.build_flags}
|
||||||
-DRPI_PICO
|
-D RPI_PICO
|
||||||
-Ivariants/ec_catsniffer
|
-I variants/rp2040/ec_catsniffer
|
||||||
-DDEBUG_RP2040_PORT=Serial
|
-D DEBUG_RP2040_PORT=Serial
|
||||||
# -DHW_SPI1_DEVICE
|
; -D HW_SPI1_DEVICE
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${rp2040_base.lib_deps}
|
${rp2040_base.lib_deps}
|
||||||
debug_build_flags = ${rp2040_base.build_flags}, -g
|
debug_build_flags = ${rp2040_base.build_flags}, -g
|
||||||
debug_tool = cmsis-dap
|
debug_tool = cmsis-dap
|
@ -2,14 +2,14 @@
|
|||||||
extends = rp2040_base
|
extends = rp2040_base
|
||||||
board = adafruit_feather
|
board = adafruit_feather
|
||||||
upload_protocol = picotool
|
upload_protocol = picotool
|
||||||
|
|
||||||
# add our variants files to the include and src paths
|
# add our variants files to the include and src paths
|
||||||
build_flags = ${rp2040_base.build_flags}
|
build_flags =
|
||||||
-DRP2040_FEATHER_RFM95
|
${rp2040_base.build_flags}
|
||||||
-Ivariants/feather_rp2040_rfm95
|
-D RP2040_FEATHER_RFM95
|
||||||
-DDEBUG_RP2040_PORT=Serial
|
-I variants/rp2040/feather_rp2040_rfm95
|
||||||
-DHW_SPI1_DEVICE
|
-D DEBUG_RP2040_PORT=Serial
|
||||||
|
-D HW_SPI1_DEVICE
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${rp2040_base.lib_deps}
|
${rp2040_base.lib_deps}
|
||||||
debug_build_flags = ${rp2040_base.build_flags}
|
debug_build_flags = ${rp2040_base.build_flags}
|
||||||
debug_tool = cmsis-dap ; for e.g. Picotool
|
debug_tool = cmsis-dap ; for e.g. Picotool
|
@ -3,14 +3,14 @@ extends = rp2040_base
|
|||||||
board = rpipico
|
board = rpipico
|
||||||
board_level = extra
|
board_level = extra
|
||||||
upload_protocol = picotool
|
upload_protocol = picotool
|
||||||
|
|
||||||
# add our variants files to the include and src paths
|
# add our variants files to the include and src paths
|
||||||
build_flags = ${rp2040_base.build_flags}
|
build_flags =
|
||||||
-DPRIVATE_HW
|
${rp2040_base.build_flags}
|
||||||
-Ivariants/nibble_rp2040
|
-D PRIVATE_HW
|
||||||
-DDEBUG_RP2040_PORT=Serial
|
-I variants/rp2040/nibble_rp2040
|
||||||
-DHW_SPI1_DEVICE
|
-D DEBUG_RP2040_PORT=Serial
|
||||||
|
-D HW_SPI1_DEVICE
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${rp2040_base.lib_deps}
|
${rp2040_base.lib_deps}
|
||||||
debug_build_flags = ${rp2040_base.build_flags}, -g
|
debug_build_flags = ${rp2040_base.build_flags}, -g
|
||||||
debug_tool = cmsis-dap ; for e.g. Picotool
|
debug_tool = cmsis-dap ; for e.g. Picotool
|
@ -2,18 +2,18 @@
|
|||||||
extends = rp2040_base
|
extends = rp2040_base
|
||||||
board = rakwireless_rak11300
|
board = rakwireless_rak11300
|
||||||
upload_protocol = picotool
|
upload_protocol = picotool
|
||||||
|
|
||||||
# add our variants files to the include and src paths
|
# add our variants files to the include and src paths
|
||||||
build_flags = ${rp2040_base.build_flags}
|
build_flags =
|
||||||
-DRAK11310
|
${rp2040_base.build_flags}
|
||||||
-Ivariants/rak11310
|
-D RAK11310
|
||||||
-DDEBUG_RP2040_PORT=Serial
|
-I variants/rp2040/rak11310
|
||||||
-DRV3028_RTC=0x52
|
-D DEBUG_RP2040_PORT=Serial
|
||||||
build_src_filter = ${rp2040_base.build_src_filter} +<../variants/rak11310> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
-D RV3028_RTC=0x52
|
||||||
|
build_src_filter = ${rp2040_base.build_src_filter} +<../variants/rp2040/rak11310> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${rp2040_base.lib_deps}
|
${rp2040_base.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${networking_base.lib_deps}
|
||||||
melopero/Melopero RV3028@^1.1.0
|
melopero/Melopero RV3028@^1.1.0
|
||||||
https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip
|
https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip
|
||||||
debug_build_flags = ${rp2040_base.build_flags}, -g
|
debug_build_flags = ${rp2040_base.build_flags}, -g
|
||||||
debug_tool = cmsis-dap ; for e.g. Picotool
|
debug_tool = cmsis-dap ; for e.g. Picotool
|
@ -2,14 +2,14 @@
|
|||||||
extends = rp2040_base
|
extends = rp2040_base
|
||||||
board = rpipico
|
board = rpipico
|
||||||
upload_protocol = picotool
|
upload_protocol = picotool
|
||||||
|
|
||||||
# add our variants files to the include and src paths
|
# add our variants files to the include and src paths
|
||||||
build_flags = ${rp2040_base.build_flags}
|
build_flags =
|
||||||
-DRP2040_LORA
|
${rp2040_base.build_flags}
|
||||||
-Ivariants/rp2040-lora
|
-D RP2040_LORA
|
||||||
-DDEBUG_RP2040_PORT=Serial
|
-I variants/rp2040/rp2040-lora
|
||||||
-DHW_SPI1_DEVICE
|
-D DEBUG_RP2040_PORT=Serial
|
||||||
|
-D HW_SPI1_DEVICE
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${rp2040_base.lib_deps}
|
${rp2040_base.lib_deps}
|
||||||
debug_build_flags = ${rp2040_base.build_flags}, -g
|
debug_build_flags = ${rp2040_base.build_flags}, -g
|
||||||
debug_tool = cmsis-dap ; for e.g. Picotool
|
debug_tool = cmsis-dap ; for e.g. Picotool
|
@ -12,11 +12,11 @@ debug_init_cmds =
|
|||||||
$LOAD_CMDS
|
$LOAD_CMDS
|
||||||
monitor init
|
monitor init
|
||||||
monitor reset halt
|
monitor reset halt
|
||||||
|
|
||||||
# add our variants files to the include and src paths
|
# add our variants files to the include and src paths
|
||||||
build_flags = ${rp2040_base.build_flags}
|
build_flags =
|
||||||
|
${rp2040_base.build_flags}
|
||||||
-DRPI_PICO
|
-DRPI_PICO
|
||||||
-Ivariants/rpipico-slowclock
|
-Ivariants/rp2040/rpipico-slowclock
|
||||||
-DDEBUG_RP2040_PORT=Serial2
|
-DDEBUG_RP2040_PORT=Serial2
|
||||||
-DHW_SPI1_DEVICE
|
-DHW_SPI1_DEVICE
|
||||||
-g
|
-g
|
||||||
@ -25,4 +25,4 @@ lib_deps =
|
|||||||
${rp2040_base.lib_deps}
|
${rp2040_base.lib_deps}
|
||||||
debug_build_flags = ${rp2040_base.build_flags}
|
debug_build_flags = ${rp2040_base.build_flags}
|
||||||
-g
|
-g
|
||||||
-DNO_USB
|
-DNO_USB
|
@ -4,12 +4,13 @@ board = rpipico
|
|||||||
upload_protocol = picotool
|
upload_protocol = picotool
|
||||||
|
|
||||||
# add our variants files to the include and src paths
|
# add our variants files to the include and src paths
|
||||||
build_flags = ${rp2040_base.build_flags}
|
build_flags =
|
||||||
-DRPI_PICO
|
${rp2040_base.build_flags}
|
||||||
-Ivariants/rpipico
|
-D RPI_PICO
|
||||||
-DDEBUG_RP2040_PORT=Serial
|
-I variants/rp2040/rpipico
|
||||||
-DHW_SPI1_DEVICE
|
-D DEBUG_RP2040_PORT=Serial
|
||||||
|
-D HW_SPI1_DEVICE
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${rp2040_base.lib_deps}
|
${rp2040_base.lib_deps}
|
||||||
debug_build_flags = ${rp2040_base.build_flags}, -g
|
debug_build_flags = ${rp2040_base.build_flags}, -g
|
||||||
debug_tool = cmsis-dap ; for e.g. Picotool
|
debug_tool = cmsis-dap ; for e.g. Picotool
|
@ -2,14 +2,14 @@
|
|||||||
extends = rp2040_base
|
extends = rp2040_base
|
||||||
board = rpipicow
|
board = rpipicow
|
||||||
upload_protocol = picotool
|
upload_protocol = picotool
|
||||||
|
|
||||||
# add our variants files to the include and src paths
|
# add our variants files to the include and src paths
|
||||||
build_flags = ${rp2040_base.build_flags}
|
build_flags =
|
||||||
-DRPI_PICO
|
${rp2040_base.build_flags}
|
||||||
-Ivariants/rpipicow
|
-D RPI_PICO
|
||||||
-DHW_SPI1_DEVICE
|
-I variants/rp2040/rpipicow
|
||||||
|
-D HW_SPI1_DEVICE
|
||||||
|
-D HAS_UDP_MULTICAST=1
|
||||||
-fexceptions # for exception handling in MQTT
|
-fexceptions # for exception handling in MQTT
|
||||||
-DHAS_UDP_MULTICAST=1
|
|
||||||
build_src_filter = ${rp2040_base.build_src_filter} +<mesh/wifi/>
|
build_src_filter = ${rp2040_base.build_src_filter} +<mesh/wifi/>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${rp2040_base.lib_deps}
|
${rp2040_base.lib_deps}
|
@ -5,9 +5,9 @@ board = rpipico
|
|||||||
upload_protocol = picotool
|
upload_protocol = picotool
|
||||||
|
|
||||||
# add our variants files to the include and src paths
|
# add our variants files to the include and src paths
|
||||||
build_flags = ${rp2040_base.build_flags}
|
build_flags = ${rp2040_base.build_flags}
|
||||||
-DSENSELORA_RP2040
|
-D SENSELORA_RP2040
|
||||||
-Ivariants/senselora_rp2040
|
-I variants/rp2040/senselora_rp2040
|
||||||
-DDEBUG_RP2040_PORT=Serial
|
-D DEBUG_RP2040_PORT=Serial
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${rp2040_base.lib_deps}
|
${rp2040_base.lib_deps}
|
@ -6,6 +6,7 @@
|
|||||||
#define BUTTON_NEED_PULLUP
|
#define BUTTON_NEED_PULLUP
|
||||||
|
|
||||||
#define LED_PIN PIN_LED
|
#define LED_PIN PIN_LED
|
||||||
|
#define ledOff(pin) pinMode(pin, INPUT)
|
||||||
|
|
||||||
#undef BATTERY_PIN
|
#undef BATTERY_PIN
|
||||||
#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION
|
#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION
|
@ -4,12 +4,13 @@ board = rpipico2
|
|||||||
upload_protocol = picotool
|
upload_protocol = picotool
|
||||||
|
|
||||||
# add our variants files to the include and src paths
|
# add our variants files to the include and src paths
|
||||||
build_flags = ${rp2350_base.build_flags}
|
build_flags =
|
||||||
-DRPI_PICO2
|
${rp2350_base.build_flags}
|
||||||
-Ivariants/rpipico2
|
-D RPI_PICO2
|
||||||
-DDEBUG_RP2040_PORT=Serial
|
-I variants/rp2350/rpipico2
|
||||||
-DHW_SPI1_DEVICE
|
-D DEBUG_RP2040_PORT=Serial
|
||||||
|
-D HW_SPI1_DEVICE
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${rp2350_base.lib_deps}
|
${rp2350_base.lib_deps}
|
||||||
debug_build_flags = ${rp2350_base.build_flags}, -g
|
debug_build_flags = ${rp2350_base.build_flags}, -g
|
||||||
debug_tool = cmsis-dap ; for e.g. Picotool
|
debug_tool = cmsis-dap ; for e.g. Picotool
|
@ -13,9 +13,10 @@ debug_init_cmds =
|
|||||||
monitor reset halt
|
monitor reset halt
|
||||||
|
|
||||||
# add our variants files to the include and src paths
|
# add our variants files to the include and src paths
|
||||||
build_flags = ${rp2350_base.build_flags}
|
build_flags =
|
||||||
|
${rp2350_base.build_flags}
|
||||||
-DRPI_PICO2
|
-DRPI_PICO2
|
||||||
-Ivariants/rpipico2w
|
-Ivariants/rp2350/rpipico2w
|
||||||
# -DDEBUG_RP2040_PORT=Serial
|
# -DDEBUG_RP2040_PORT=Serial
|
||||||
-DHW_SPI1_DEVICE
|
-DHW_SPI1_DEVICE
|
||||||
-DARDUINO_RASPBERRY_PI_PICO_2W
|
-DARDUINO_RASPBERRY_PI_PICO_2W
|
@ -5,7 +5,7 @@ board_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem
|
|||||||
board_level = extra
|
board_level = extra
|
||||||
build_flags =
|
build_flags =
|
||||||
${stm32_base.build_flags}
|
${stm32_base.build_flags}
|
||||||
-Ivariants/CDEBYTE_E77-MBL
|
-Ivariants/stm32/CDEBYTE_E77-MBL
|
||||||
-DSERIAL_UART_INSTANCE=1
|
-DSERIAL_UART_INSTANCE=1
|
||||||
-DPIN_SERIAL_RX=PA3
|
-DPIN_SERIAL_RX=PA3
|
||||||
-DPIN_SERIAL_TX=PA2
|
-DPIN_SERIAL_TX=PA2
|
@ -4,7 +4,7 @@ board = wiscore_rak3172
|
|||||||
board_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem
|
board_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem
|
||||||
build_flags =
|
build_flags =
|
||||||
${stm32_base.build_flags}
|
${stm32_base.build_flags}
|
||||||
-Ivariants/rak3172
|
-Ivariants/stm32/rak3172
|
||||||
-DPIN_WIRE_SDA=PA11
|
-DPIN_WIRE_SDA=PA11
|
||||||
-DPIN_WIRE_SCL=PA12
|
-DPIN_WIRE_SCL=PA12
|
||||||
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1
|
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1
|
@ -4,7 +4,7 @@ board = lora_e5_dev_board
|
|||||||
board_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem
|
board_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem
|
||||||
build_flags =
|
build_flags =
|
||||||
${stm32_base.build_flags}
|
${stm32_base.build_flags}
|
||||||
-Ivariants/wio-e5
|
-Ivariants/stm32/wio-e5
|
||||||
-DSERIAL_UART_INSTANCE=1
|
-DSERIAL_UART_INSTANCE=1
|
||||||
-DPIN_SERIAL_RX=PB7
|
-DPIN_SERIAL_RX=PB7
|
||||||
-DPIN_SERIAL_TX=PB6
|
-DPIN_SERIAL_TX=PB6
|
@ -6,6 +6,7 @@ board_build.partitions = default_16MB.csv
|
|||||||
build_flags =
|
build_flags =
|
||||||
${esp32s3_base.build_flags}
|
${esp32s3_base.build_flags}
|
||||||
-D T_ETH_ELITE
|
-D T_ETH_ELITE
|
||||||
|
-D HAS_UDP_MULTICAST=1
|
||||||
-I variants/t-eth-elite
|
-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.
|
-D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user