diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yml b/.github/ISSUE_TEMPLATE/Bug Report.yml index 795c1b1a0..d4e00b4ed 100644 --- a/.github/ISSUE_TEMPLATE/Bug Report.yml +++ b/.github/ISSUE_TEMPLATE/Bug Report.yml @@ -40,10 +40,12 @@ body: - T-Echo - Rak4631 - Rak11200 + - Rak11310 - Heltec v1 - Heltec v2 - Heltec v2.1 - Heltec V3 + - Raspberry Pi Pico (W) - Relay v1 - Relay v2 - DIY diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9ef8f77c6..32f280a04 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -7,7 +7,8 @@ is appreciated." This will allow other devs to potentially save you time by not accidentially duplicating work etc... - Please do not check in files that don't have real changes - Please do not reformat lines that you didn't have to change the code on -- We recommend using the [Visual Studio Code](https://platformio.org/install/ide?install=vscode) editor and the 'clang-format' extension, - because automatically follows our indentation rules and it's auto reformatting will not cause spurious changes to lines. +- We recommend using the [Visual Studio Code](https://platformio.org/install/ide?install=vscode) editor along with the ['Trunk Check' extension](https://marketplace.visualstudio.com/items?itemName=trunk.io) (WSL2 is required on windows), + because it automatically follows our indentation rules and its auto reformatting will not cause spurious changes to lines. - If your PR fixes a bug, mention "fixes #bugnum" somewhere in your pull request description. - If your other co-developers have comments on your PR please tweak as needed. +- Please also enable "Allow edits by maintainers". diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 1eee86c8e..00af93e15 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -232,7 +232,8 @@ uint32_t RadioInterface::getTxDelayMsecWeighted(float snr) delay = random(0, 2 * CWsize) * slotTimeMsec; LOG_DEBUG("rx_snr found in packet. As a router, setting tx delay:%d\n", delay); } else { - delay = random(0, pow(2, CWsize)) * slotTimeMsec; + // offset the maximum delay for routers: (2 * CWmax * slotTimeMsec) + delay = (2 * CWmax * slotTimeMsec) + random(0, pow(2, CWsize)) * slotTimeMsec; LOG_DEBUG("rx_snr found in packet. Setting tx delay:%d\n", delay); } diff --git a/src/mesh/eth/ethClient.cpp b/src/mesh/eth/ethClient.cpp index 659de05f8..c60e35394 100644 --- a/src/mesh/eth/ethClient.cpp +++ b/src/mesh/eth/ethClient.cpp @@ -98,6 +98,11 @@ static int32_t reconnectETH() return 5000; // every 5 seconds } +static uint32_t bigToLittleEndian(uint32_t value) +{ + return ((value >> 24) & 0xFF) | ((value >> 8) & 0xFF00) | ((value << 8) & 0xFF0000) | ((value << 24) & 0xFF000000); +} + // Startup Ethernet bool initEthernet() { @@ -126,7 +131,15 @@ bool initEthernet() status = Ethernet.begin(mac); } else if (config.network.address_mode == meshtastic_Config_NetworkConfig_AddressMode_STATIC) { LOG_INFO("starting Ethernet Static\n"); - Ethernet.begin(mac, config.network.ipv4_config.ip, config.network.ipv4_config.dns, config.network.ipv4_config.subnet); + + IPAddress ip = IPAddress(bigToLittleEndian(config.network.ipv4_config.ip)); + IPAddress dns = IPAddress(bigToLittleEndian(config.network.ipv4_config.dns)); + IPAddress gateway = IPAddress(bigToLittleEndian(config.network.ipv4_config.gateway)); + IPAddress subnet = IPAddress(bigToLittleEndian(config.network.ipv4_config.subnet)); + + Ethernet.begin(mac, ip, dns, gateway, subnet); + + status = 1; } else { LOG_INFO("Ethernet Disabled\n"); return false; diff --git a/version.properties b/version.properties index d131e4cc8..c3cd821a8 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 1 -build = 15 +build = 16