mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
Initial TCP server
This commit is contained in:
20
components/constants/include/constants/config.h
Normal file
20
components/constants/include/constants/config.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Created by Johnathon Slightham on 2025-06-12.
|
||||
//
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#define NVS_FLASH_NAMESPACE "app"
|
||||
#define DEFAULT_MODULE_ID 0
|
||||
#define DEFAULT_MODULE_TYPE 0
|
||||
|
||||
#define MODULE_ID_KEY "module_id"
|
||||
#define MODULE_TYPE_KEY "module_type"
|
||||
|
||||
|
||||
enum ModuleType { splitter }; // todo: maybe this should be flatbuffer
|
||||
|
||||
|
||||
|
||||
#endif //CONFIG_H
|
||||
18
components/constants/include/constants/tcp.h
Normal file
18
components/constants/include/constants/tcp.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Created by Johnathon Slightham on 2025-06-01.
|
||||
//
|
||||
|
||||
#ifndef TCP_H
|
||||
#define TCP_H
|
||||
|
||||
#define TCP_DEFAULT_LISTEN_BACKLOG 1
|
||||
|
||||
#define KEEPALIVE_IDLE 7200
|
||||
#define KEEPALIVE_INTERVAL 75
|
||||
#define KEEPALIVE_COUNT 9
|
||||
|
||||
#define SLEEP_AFTER_FAIL_MS 5000
|
||||
|
||||
#define TCP_PORT 3001
|
||||
|
||||
#endif //TCP_H
|
||||
@@ -5,8 +5,9 @@
|
||||
#ifndef WIFI_H
|
||||
#define WIFI_H
|
||||
|
||||
#define WIFI_SSID "botchain"
|
||||
#define SOFTAP_CHANNEL 1
|
||||
#define SOFTAP_MAX_CONNECTIONS 10
|
||||
// SoftAP Configuration
|
||||
#define WIFI_SSID "botchain"
|
||||
#define SOFTAP_CHANNEL 1
|
||||
#define SOFTAP_MAX_CONNECTIONS 10
|
||||
|
||||
#endif //WIFI_H
|
||||
|
||||
Reference in New Issue
Block a user