mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-15 23:56:38 +00:00
Address PR review feedback for Ethernet support
- Add #pragma once to SerialEthernetInterface.h
- Rename TCP_PORT to ETH_TCP_PORT with #ifndef guard
- Fix typos: "initalizing" → "initializing"
- Fix #elif without condition → #else for STM32 block
- Replace infinite loop on ETH init failure with halt()
- Remove heartbeat Serial.print(".") output
- Remove dead beginETH() call (ETH_ENABLED, not RAK_ETH_ENABLE)
- Comment out MESH_DEBUG and ETH_DEBUG_LOGGING build flags
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
70b51bd096
commit
aea64e1f19
@@ -20,7 +20,7 @@ SPIClass ETH_SPI_PORT(NRF_SPIM1, PIN_SPI1_MISO, PIN_SPI1_SCK, PIN_SPI1_MOSI);
|
||||
|
||||
bool SerialEthernetInterface::begin() {
|
||||
|
||||
ETH_DEBUG_PRINTLN("Ethernet initalizing");
|
||||
ETH_DEBUG_PRINTLN("Ethernet initializing");
|
||||
|
||||
#ifdef PIN_ETH_POWER_EN
|
||||
ETH_DEBUG_PRINTLN("Ethernet power enable");
|
||||
@@ -90,7 +90,7 @@ bool SerialEthernetInterface::begin() {
|
||||
ETH_DEBUG_PRINT_IP("Gateway", gateway);
|
||||
|
||||
server.begin(); // start listening for clients
|
||||
ETH_DEBUG_PRINTLN("Ethernet: listening on TCP port: %d", TCP_PORT);
|
||||
ETH_DEBUG_PRINTLN("Ethernet: listening on TCP port: %d", ETH_TCP_PORT);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "helpers/BaseSerialInterface.h"
|
||||
#include <SPI.h>
|
||||
#include <RAK13800_W5100S.h>
|
||||
|
||||
// expects ETH_ENABLED = 1
|
||||
#define TCP_PORT 5000
|
||||
#ifndef ETH_TCP_PORT
|
||||
#define ETH_TCP_PORT 5000
|
||||
#endif
|
||||
// define ETH_RAW_LINE=1 to use raw line-based CLI instead of framed packets
|
||||
|
||||
class SerialEthernetInterface : public BaseSerialInterface {
|
||||
@@ -42,7 +44,7 @@ class SerialEthernetInterface : public BaseSerialInterface {
|
||||
protected:
|
||||
|
||||
public:
|
||||
SerialEthernetInterface() : server(EthernetServer(TCP_PORT)) {
|
||||
SerialEthernetInterface() : server(EthernetServer(ETH_TCP_PORT)) {
|
||||
deviceConnected = false;
|
||||
_isEnabled = false;
|
||||
_last_write = 0;
|
||||
|
||||
Reference in New Issue
Block a user