mirror of
https://github.com/meshtastic/firmware.git
synced 2025-05-04 04:47:25 +00:00
commit
eb29f10634
@ -68,7 +68,7 @@ lib_deps =
|
|||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
; Portduino is using meshtastic fork for now
|
; Portduino is using meshtastic fork for now
|
||||||
jgromes/RadioLib@5.4.1
|
jgromes/RadioLib@5.4.1
|
||||||
https://github.com/caveman99/SparkFun_ATECCX08a_Arduino_Library.git#008e7f9d40bad66b2f7a0074aaac05b7c424339d
|
https://github.com/meshtastic/SparkFun_ATECCX08a_Arduino_Library.git#52b5282639d08a8cbd4b748363089eed6102dc76
|
||||||
|
|
||||||
build_flags = ${env.build_flags} -Os
|
build_flags = ${env.build_flags} -Os
|
||||||
-DRADIOLIB_SPI_PARANOID=0
|
-DRADIOLIB_SPI_PARANOID=0
|
||||||
|
@ -13,15 +13,10 @@
|
|||||||
|
|
||||||
// NTP
|
// NTP
|
||||||
EthernetUDP ntpUDP;
|
EthernetUDP ntpUDP;
|
||||||
|
|
||||||
NTPClient timeClient(ntpUDP, config.network.ntp_server);
|
NTPClient timeClient(ntpUDP, config.network.ntp_server);
|
||||||
|
|
||||||
uint32_t ntp_renew = 0;
|
uint32_t ntp_renew = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Stores our hostname
|
|
||||||
char ourHost[16];
|
|
||||||
|
|
||||||
bool ethStartupComplete = 0;
|
bool ethStartupComplete = 0;
|
||||||
|
|
||||||
using namespace concurrency;
|
using namespace concurrency;
|
||||||
@ -36,22 +31,11 @@ static int32_t reconnectETH()
|
|||||||
// Start web server
|
// Start web server
|
||||||
DEBUG_MSG("... Starting network services\n");
|
DEBUG_MSG("... Starting network services\n");
|
||||||
|
|
||||||
// // start mdns
|
#ifndef DISABLE_NTP
|
||||||
// if (!MDNS.begin("Meshtastic")) {
|
|
||||||
// DEBUG_MSG("Error setting up MDNS responder!\n");
|
|
||||||
// } else {
|
|
||||||
// DEBUG_MSG("mDNS responder started\n");
|
|
||||||
// DEBUG_MSG("mDNS Host: Meshtastic.local\n");
|
|
||||||
// MDNS.addService("http", "tcp", 80);
|
|
||||||
// MDNS.addService("https", "tcp", 443);
|
|
||||||
// }
|
|
||||||
|
|
||||||
#ifndef DISABLE_NTP
|
|
||||||
DEBUG_MSG("Starting NTP time client\n");
|
DEBUG_MSG("Starting NTP time client\n");
|
||||||
timeClient.begin();
|
timeClient.begin();
|
||||||
timeClient.setUpdateInterval(60 * 60); // Update once an hour
|
timeClient.setUpdateInterval(60 * 60); // Update once an hour
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// initWebServer();
|
// initWebServer();
|
||||||
initApiServer();
|
initApiServer();
|
||||||
|
|
||||||
@ -66,7 +50,8 @@ static int32_t reconnectETH()
|
|||||||
|
|
||||||
#ifndef DISABLE_NTP
|
#ifndef DISABLE_NTP
|
||||||
if (isEthernetAvailable() && (ntp_renew < millis())) {
|
if (isEthernetAvailable() && (ntp_renew < millis())) {
|
||||||
DEBUG_MSG("Updating NTP time\n");
|
|
||||||
|
DEBUG_MSG("Updating NTP time from %s\n", config.network.ntp_server);
|
||||||
if (timeClient.update()) {
|
if (timeClient.update()) {
|
||||||
DEBUG_MSG("NTP Request Success - Setting RTCQualityNTP if needed\n");
|
DEBUG_MSG("NTP Request Success - Setting RTCQualityNTP if needed\n");
|
||||||
|
|
||||||
@ -76,10 +61,11 @@ static int32_t reconnectETH()
|
|||||||
|
|
||||||
perhapsSetRTC(RTCQualityNTP, &tv);
|
perhapsSetRTC(RTCQualityNTP, &tv);
|
||||||
|
|
||||||
ntp_renew = millis() + 43200 * 1000; // every 12 hours
|
ntp_renew = millis() + 43200 * 1000; // success, refresh every 12 hours
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
DEBUG_MSG("NTP Update failed\n");
|
DEBUG_MSG("NTP Update failed\n");
|
||||||
|
ntp_renew = millis() + 300 * 1000; // failure, retry every 5 minutes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -90,10 +76,6 @@ static int32_t reconnectETH()
|
|||||||
// Startup Ethernet
|
// Startup Ethernet
|
||||||
bool initEthernet()
|
bool initEthernet()
|
||||||
{
|
{
|
||||||
|
|
||||||
// config.network.eth_enabled = true;
|
|
||||||
// config.network.eth_mode = Config_NetworkConfig_EthMode_DHCP;
|
|
||||||
|
|
||||||
if (config.network.eth_enabled) {
|
if (config.network.eth_enabled) {
|
||||||
|
|
||||||
#ifdef PIN_ETHERNET_RESET
|
#ifdef PIN_ETHERNET_RESET
|
||||||
|
@ -8,7 +8,7 @@ lib_deps =
|
|||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${networking_base.lib_deps}
|
||||||
melopero/Melopero RV3028@^1.1.0
|
melopero/Melopero RV3028@^1.1.0
|
||||||
https://github.com/caveman99/RAK13800-W5100S.git#main
|
https://github.com/meshtastic/RAK13800-W5100S.git#b680706eb8006cd62c919ac74c8af1950eb82c81
|
||||||
debug_tool = jlink
|
debug_tool = jlink
|
||||||
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
|
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
|
||||||
;upload_protocol = jlink
|
;upload_protocol = jlink
|
Loading…
Reference in New Issue
Block a user