mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-19 09:12:45 +00:00
* Add API types, state, and log message in Debug screen * un-goober the API state tracking * Set the SerialConsole api_type * Add api_type for Ethernet * Remove API state debugging code * Update wording for client connection states * Improve string width for smaller screen devices * Reserve space on navigation bar to fit link indicator * Add persistent Connected icon to screen * Connect System frame to ensure text doesn't overflow --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> Co-authored-by: Jason P <applewiz@mac.com> Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
28 lines
598 B
C++
28 lines
598 B
C++
#include "configuration.h"
|
|
#include <Arduino.h>
|
|
|
|
#if HAS_ETHERNET && !defined(USE_WS5500)
|
|
|
|
#include "ethServerAPI.h"
|
|
|
|
static ethServerPort *apiPort;
|
|
|
|
void initApiServer(int port)
|
|
{
|
|
// Start API server on port 4403
|
|
if (!apiPort) {
|
|
apiPort = new ethServerPort(port);
|
|
LOG_INFO("API server listening on TCP port %d", port);
|
|
apiPort->init();
|
|
}
|
|
}
|
|
|
|
ethServerAPI::ethServerAPI(EthernetClient &_client) : ServerAPI(_client)
|
|
{
|
|
LOG_INFO("Incoming ethernet connection");
|
|
api_type = TYPE_ETH;
|
|
}
|
|
|
|
ethServerPort::ethServerPort(int port) : APIServerPort(port) {}
|
|
|
|
#endif |