Fix release matrix build failures
This commit is contained in:
1 parent
44ec918303
commit
462e639270
14 files changed
+89
-26
No files matched your search
@@ -942,7 +942,7 @@ const char *MyMesh::getLogDateTime() {
|
||||
}
|
||||
|
||||
void MyMesh::logRxRaw(float snr, float rssi, const uint8_t raw[], int len) {
|
||||
#if MESH_PACKET_LOGGING
|
||||
#if MESH_PACKET_LOGGING && !defined(MESH_COMPACT_PACKET_LOGGING)
|
||||
// Logging builds prefer backpressure over silently losing a packet record.
|
||||
Serial.print(getLogDateTime());
|
||||
Serial.print(" RAW: ");
|
||||
@@ -7936,20 +7936,41 @@ static void formatPathReply(const uint8_t* path, uint8_t path_len, char* out, si
|
||||
out[pos] = 0;
|
||||
}
|
||||
|
||||
static bool isClientPathCommand(const char* command) {
|
||||
return strcmp(command, "get outpath") == 0
|
||||
|| strcmp(command, "set outpath") == 0
|
||||
|| strncmp(command, "set outpath ", 12) == 0
|
||||
|| strcmp(command, "get altpath") == 0
|
||||
|| strcmp(command, "set altpath") == 0
|
||||
|| strncmp(command, "set altpath ", 12) == 0;
|
||||
enum ClientPathCommand : uint8_t {
|
||||
CLIENT_PATH_NONE = 0,
|
||||
CLIENT_PATH_VALID = 1,
|
||||
CLIENT_PATH_SET = 2,
|
||||
CLIENT_PATH_ALT = 4,
|
||||
};
|
||||
|
||||
static __attribute__((always_inline)) ClientPathCommand classifyClientPathCommand(const char* command) {
|
||||
uint8_t result = CLIENT_PATH_VALID;
|
||||
bool is_get = strncmp(command, "get ", 4) == 0;
|
||||
if (!is_get) {
|
||||
if (strncmp(command, "set ", 4) != 0) return CLIENT_PATH_NONE;
|
||||
result |= CLIENT_PATH_SET;
|
||||
}
|
||||
|
||||
const char* path = command + 4;
|
||||
if (strncmp(path, "outpath", 7) != 0) {
|
||||
if (strncmp(path, "altpath", 7) != 0) return CLIENT_PATH_NONE;
|
||||
result |= CLIENT_PATH_ALT;
|
||||
}
|
||||
|
||||
if (is_get) {
|
||||
if (path[7] != 0) return CLIENT_PATH_NONE;
|
||||
} else if (path[7] != 0 && path[7] != ' ') {
|
||||
return CLIENT_PATH_NONE;
|
||||
}
|
||||
return (ClientPathCommand)result;
|
||||
}
|
||||
|
||||
bool MyMesh::handleClientPathCommand(ClientInfo* sender, char* command, char* reply) {
|
||||
if (!isClientPathCommand(command)) return false;
|
||||
const ClientPathCommand path_command = classifyClientPathCommand(command);
|
||||
if (path_command == CLIENT_PATH_NONE) return false;
|
||||
|
||||
bool is_get = strncmp(command, "get ", 4) == 0;
|
||||
bool is_alt = strncmp(command + 4, "altpath", 7) == 0;
|
||||
bool is_get = (path_command & CLIENT_PATH_SET) == 0;
|
||||
bool is_alt = (path_command & CLIENT_PATH_ALT) != 0;
|
||||
if (sender == NULL) {
|
||||
strcpy(reply, "Err - command needs remote client context");
|
||||
return true;
|
||||
@@ -8143,7 +8164,7 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, ClientInfo* sender, char *
|
||||
// Reply-path overrides are core remote-client routing controls. Keep them
|
||||
// available before the portable observer hands the remaining commands to
|
||||
// its reduced CommonCLI parser.
|
||||
if (isClientPathCommand(command)) {
|
||||
if (classifyClientPathCommand(command) != CLIENT_PATH_NONE) {
|
||||
if (sender && !sender->isAdmin()) {
|
||||
bool allowed = (sender->isRegionMgr() || sender->isFilterMgr())
|
||||
&& isCommonManagerReadOnlyAllowed(command);
|
||||
|
||||
@@ -103,13 +103,21 @@ uint32_t Dispatcher::getCADFailMaxDuration() const {
|
||||
|
||||
#if MESH_PACKET_LOGGING
|
||||
void Dispatcher::logPacketStart(const char* direction, const Packet* packet, int len) {
|
||||
#if defined(MESH_COMPACT_PACKET_LOGGING)
|
||||
(void)packet;
|
||||
Serial.printf("%s %d\n", direction, len);
|
||||
#else
|
||||
Serial.print(getLogDateTime());
|
||||
Serial.printf(": %s, len=%d (type=%d, route=%s, payload_len=%d)",
|
||||
direction, len, packet->getPayloadType(),
|
||||
packet->isRouteDirect() ? "D" : "F", packet->payload_len);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Dispatcher::logPacketEnd(const Packet* packet) {
|
||||
#if defined(MESH_COMPACT_PACKET_LOGGING)
|
||||
(void)packet;
|
||||
#else
|
||||
const uint8_t type = packet->getPayloadType();
|
||||
if (packet->payload_len >= 2
|
||||
&& (type == PAYLOAD_TYPE_PATH || type == PAYLOAD_TYPE_REQ
|
||||
@@ -119,6 +127,7 @@ void Dispatcher::logPacketEnd(const Packet* packet) {
|
||||
} else {
|
||||
Serial.write((uint8_t)'\n');
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -442,6 +451,7 @@ void Dispatcher::checkRecv() {
|
||||
if (pkt) {
|
||||
#if MESH_PACKET_LOGGING
|
||||
logPacketStart("RX", pkt, pkt->getRawLength());
|
||||
#if !defined(MESH_COMPACT_PACKET_LOGGING)
|
||||
Serial.printf(" SNR=%d RSSI=%d score=%d time=%d", (int)pkt->getSNR(),
|
||||
(int)rssi, (int)(score * 1000), air_time);
|
||||
|
||||
@@ -450,6 +460,7 @@ void Dispatcher::checkRecv() {
|
||||
Serial.print(" hash=");
|
||||
mesh::Utils::printHex(Serial, packet_hash, MAX_HASH_SIZE);
|
||||
logPacketEnd(pkt);
|
||||
#endif
|
||||
#endif
|
||||
logRx(pkt, pkt->getRawLength(), score); // hook for custom logging
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ static bool isValidName(const char *n) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(ESP32_PLATFORM) || defined(USER_GPIO_CONTROL)
|
||||
static bool isGpioConfig(const char* config) {
|
||||
static const char expected[] = "gpio";
|
||||
for (size_t i = 0; i < sizeof(expected) - 1; i++) {
|
||||
@@ -141,6 +142,7 @@ static bool isGpioConfig(const char* config) {
|
||||
}
|
||||
return config[sizeof(expected) - 1] == '\0' || config[sizeof(expected) - 1] == ' ';
|
||||
}
|
||||
#endif
|
||||
|
||||
void CommonCLI::loop() {
|
||||
#if defined(ESP32_PLATFORM) || defined(USER_GPIO_CONTROL)
|
||||
@@ -3029,8 +3031,8 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, char* command, char* re
|
||||
|
||||
void CommonCLI::handleSetCmd(uint32_t sender_timestamp, char* command, char* reply) {
|
||||
const char* config = &command[4];
|
||||
if (isGpioConfig(config)) {
|
||||
#if defined(ESP32_PLATFORM) || defined(USER_GPIO_CONTROL)
|
||||
if (isGpioConfig(config)) {
|
||||
const UserGpio::SetResult result = _user_gpio.handleSet(
|
||||
config + 4, reply, 160, sender_timestamp,
|
||||
_callbacks->getUserGpioRequestSource());
|
||||
@@ -3040,11 +3042,9 @@ void CommonCLI::handleSetCmd(uint32_t sender_timestamp, char* command, char* rep
|
||||
result.cancelled_timer) {
|
||||
_callbacks->onUserGpioTimerCancelled(result.pin);
|
||||
}
|
||||
#else
|
||||
strcpy(reply, "Error: GPIO control unsupported on this build");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(ESP_PLATFORM) && defined(ADMIN_PASSWORD) && !defined(WEBCONFIG_DISABLED)
|
||||
if (memcmp(config, "webui ", 6) == 0) {
|
||||
@@ -4161,14 +4161,12 @@ void CommonCLI::handleSetCmd(uint32_t sender_timestamp, char* command, char* rep
|
||||
|
||||
void CommonCLI::handleGetCmd(uint32_t sender_timestamp, char* command, char* reply) {
|
||||
const char* config = &command[4];
|
||||
if (isGpioConfig(config)) {
|
||||
#if defined(ESP32_PLATFORM) || defined(USER_GPIO_CONTROL)
|
||||
if (isGpioConfig(config)) {
|
||||
_user_gpio.handleGet(config + 4, reply, 160);
|
||||
#else
|
||||
strcpy(reply, "Error: GPIO control unsupported on this build");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(ESP_PLATFORM) && defined(ADMIN_PASSWORD) && !defined(WEBCONFIG_DISABLED)
|
||||
if (strcmp(config, "webui") == 0) {
|
||||
|
||||
@@ -3,6 +3,13 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// Simulator targets do not include RadioLib, but board pin macros can still
|
||||
// use its sentinel value. Keep the fallback local to this header.
|
||||
#ifndef RADIOLIB_NC
|
||||
#define RADIOLIB_NC (-1)
|
||||
#define USER_GPIO_PIN_POLICY_UNDEF_RADIOLIB_NC
|
||||
#endif
|
||||
|
||||
// This header is intentionally included only after target.h. The target's
|
||||
// build-time pin definitions are the authoritative list of GPIOs claimed by
|
||||
// the firmware in that particular image.
|
||||
@@ -589,3 +596,8 @@ inline bool isFirmwareReserved(uint8_t pin) {
|
||||
}
|
||||
|
||||
} // namespace UserGpioPinPolicy
|
||||
|
||||
#ifdef USER_GPIO_PIN_POLICY_UNDEF_RADIOLIB_NC
|
||||
#undef RADIOLIB_NC
|
||||
#undef USER_GPIO_PIN_POLICY_UNDEF_RADIOLIB_NC
|
||||
#endif
|
||||
@@ -8,6 +8,8 @@ class CustomLLCC68Wrapper : public RadioLibWrapper {
|
||||
public:
|
||||
CustomLLCC68Wrapper(CustomLLCC68& radio, mesh::MainBoard& board) : RadioLibWrapper(radio, board) { }
|
||||
|
||||
void powerOff() { _radio->standby(); _radio->sleep(); }
|
||||
|
||||
protected:
|
||||
bool applyParams(float freq, float bw, uint8_t sf, uint8_t cr) override {
|
||||
bool success = ((CustomLLCC68 *)_radio)->setFrequency(freq) == RADIOLIB_ERR_NONE
|
||||
|
||||
@@ -12,6 +12,8 @@ class CustomLR1110Wrapper : public RadioLibWrapper {
|
||||
public:
|
||||
CustomLR1110Wrapper(CustomLR1110& radio, mesh::MainBoard& board) : RadioLibWrapper(radio, board) { }
|
||||
|
||||
void powerOff() { _radio->standby(); _radio->sleep(); }
|
||||
|
||||
protected:
|
||||
bool applyParams(float freq, float bw, uint8_t sf, uint8_t cr) override {
|
||||
bool success = ((CustomLR1110 *)_radio)->setFrequency(freq) == RADIOLIB_ERR_NONE
|
||||
@@ -56,6 +58,7 @@ public:
|
||||
}
|
||||
|
||||
bool supportsRxPowerSaving() const override { return true; }
|
||||
void onReceiveProcessed() override { finishReceiveProcessing(); }
|
||||
|
||||
protected:
|
||||
bool isPacketReady() override {
|
||||
|
||||
@@ -47,12 +47,13 @@ public:
|
||||
return packetScoreInt(snr, sf, packet_len);
|
||||
}
|
||||
uint8_t getSpreadingFactor() const override { return ((CustomSX1262 *)_radio)->spreadingFactor; }
|
||||
virtual void powerOff() override {
|
||||
void powerOff() {
|
||||
((CustomSX1262 *)_radio)->standby();
|
||||
((CustomSX1262 *)_radio)->sleep(false);
|
||||
}
|
||||
|
||||
bool supportsRxPowerSaving() const override { return true; }
|
||||
void onReceiveProcessed() override { finishReceiveProcessing(); }
|
||||
|
||||
protected:
|
||||
int startReceiveMode() override {
|
||||
|
||||
@@ -12,6 +12,8 @@ class CustomSX1268Wrapper : public RadioLibWrapper {
|
||||
public:
|
||||
CustomSX1268Wrapper(CustomSX1268& radio, mesh::MainBoard& board) : RadioLibWrapper(radio, board) { }
|
||||
|
||||
void powerOff() { _radio->standby(); _radio->sleep(); }
|
||||
|
||||
protected:
|
||||
bool applyParams(float freq, float bw, uint8_t sf, uint8_t cr) override {
|
||||
bool success = ((CustomSX1268 *)_radio)->setFrequency(freq) == RADIOLIB_ERR_NONE
|
||||
|
||||
@@ -11,6 +11,8 @@ class CustomSX1276Wrapper : public RadioLibWrapper {
|
||||
public:
|
||||
CustomSX1276Wrapper(CustomSX1276& radio, mesh::MainBoard& board) : RadioLibWrapper(radio, board) { }
|
||||
|
||||
void powerOff() { _radio->standby(); _radio->sleep(); }
|
||||
|
||||
protected:
|
||||
bool applyParams(float freq, float bw, uint8_t sf, uint8_t cr) override {
|
||||
return ((CustomSX1276 *)_radio)->setFrequency(freq) == RADIOLIB_ERR_NONE
|
||||
|
||||
@@ -606,7 +606,7 @@ int RadioLibWrapper::recvRaw(uint8_t* bytes, int sz) {
|
||||
return len;
|
||||
}
|
||||
|
||||
void RadioLibWrapper::onReceiveProcessed() {
|
||||
void RadioLibWrapper::finishReceiveProcessing() {
|
||||
if (!_rx_hold_continuous) return;
|
||||
|
||||
if ((state & ~STATE_INT_READY) == STATE_TX_WAIT) {
|
||||
|
||||
@@ -79,6 +79,7 @@ protected:
|
||||
void requestNoiseFloorRefresh();
|
||||
void noiseFloorCalibCheck(unsigned long now);
|
||||
void endNoiseFloorCalib(unsigned long now);
|
||||
void finishReceiveProcessing();
|
||||
void cacheParams(float freq, float bw, uint8_t sf, uint8_t cr) {
|
||||
_cur_freq = freq; _cur_bw = bw; _cur_sf = sf; _cur_cr = cr; _params_valid = true;
|
||||
}
|
||||
@@ -127,9 +128,7 @@ public:
|
||||
}
|
||||
|
||||
void begin() override;
|
||||
virtual void powerOff() { _radio->standby(); _radio->sleep(); }
|
||||
int recvRaw(uint8_t* bytes, int sz) override;
|
||||
void onReceiveProcessed() override;
|
||||
uint32_t getEstAirtimeFor(int len_bytes) override;
|
||||
bool startSendRaw(const uint8_t* bytes, int len) override;
|
||||
bool isSendComplete() override;
|
||||
|
||||
@@ -31,7 +31,7 @@ debug_tool = jlink
|
||||
upload_protocol = nrfutil
|
||||
lib_deps = ${rak4631_hw.lib_deps}
|
||||
${sensor_base.lib_deps}
|
||||
build_src_filter = ${nrf52_base.build_src_filter}
|
||||
build_src_filter = ${rak4631_hw.build_src_filter}
|
||||
+<helpers/ui/NullDisplayDriver.cpp>
|
||||
|
||||
[ikoka_nano_nrf_e22_22dbm]
|
||||
|
||||
@@ -16,4 +16,8 @@ static const uint8_t MOSI = 10;
|
||||
static const uint8_t MISO = 9;
|
||||
static const uint8_t SCK = 11;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
// Default ESP32-S3 UART0 pins used by HardwareSerial.
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
@@ -40,6 +40,11 @@ build_flags = ${lora_e5.build_flags}
|
||||
-flto
|
||||
-fno-inline-small-functions ; reduce flash without moving the deployed filesystem boundary
|
||||
-fipa-pta
|
||||
-fmerge-all-constants
|
||||
-fno-ipa-cp-clone
|
||||
-fno-partial-inlining
|
||||
-fno-jump-tables
|
||||
-fno-tree-switch-conversion
|
||||
-fno-semantic-interposition
|
||||
-fno-unwind-tables
|
||||
-fno-asynchronous-unwind-tables
|
||||
@@ -49,6 +54,9 @@ build_flags = ${lora_e5.build_flags}
|
||||
-D ADVERT_NAME='"WIO-E5 Repeater"'
|
||||
-D ADMIN_PASSWORD='"password"'
|
||||
-D MAX_NEIGHBOURS=50
|
||||
-D FLOOD_PACKET_FILTER_SLOTS=8
|
||||
-D FLOOD_CHANNEL_SCOPE_SLOTS=7
|
||||
-D MESH_COMPACT_PACKET_LOGGING=1
|
||||
-D ENABLE_HWSERIAL2
|
||||
-D WITH_RS232_BRIDGE=Serial2
|
||||
-D WITH_RS232_BRIDGE_RX=PA3
|
||||
|
||||
Reference in new issue
Block a user