Central Heating controller using the real time clock, PHY module for internet, 1-wire interface for temperature sensors, a system log and a configuration file

Dependencies:   net 1-wire lpc1768 crypto clock web fram log

/media/uploads/andrewboyson/heating.sch

/media/uploads/andrewboyson/heating.brd

/media/uploads/andrewboyson/eagle.epf

Revision:
38:2bfeefa8709a
Parent:
32:bbf9c8b45a2e
Child:
45:21033b9620c1
--- a/settings/settings.c	Mon Mar 11 10:07:11 2019 +0000
+++ b/settings/settings.c	Mon Mar 11 16:47:54 2019 +0000
@@ -11,6 +11,7 @@
 #include   "dnsquery.h"
 #include   "dnsreply.h"
 #include  "dnsserver.h"
+#include   "dnslabel.h"
 #include        "ntp.h"
 #include       "dhcp.h"
 #include         "ns.h"
@@ -153,9 +154,7 @@
 static int iOffsetMs;
 static int iMaxDelayMs;
 
-static void lblcpy(char* dst, char* src) { strncpy(dst, src, DNS_MAX_LABEL_LENGTH); dst[DNS_MAX_LABEL_LENGTH] = 0; }
-
-void SetNtpClientServerName      ( char* value) { lblcpy(NtpClientQueryServerName,            value); FramWrite(iServerName,      DNS_MAX_LABEL_LENGTH,  NtpClientQueryServerName      ); }
+void SetNtpClientServerName      ( char* value) { DnsLabelCopy(NtpClientQueryServerName,      value); FramWrite(iServerName,      DNS_MAX_LABEL_LENGTH,  NtpClientQueryServerName      ); }
 void SetNtpClientInitialInterval ( int   value) { NtpClientQueryInitialInterval    = (int32_t)value ; FramWrite(iInitialInterval,                    4, &NtpClientQueryInitialInterval ); }
 void SetNtpClientNormalInterval  ( int   value) { NtpClientQueryNormalInterval     = (int32_t)value ; FramWrite(iNormalInterval,                     4, &NtpClientQueryNormalInterval  ); }
 void SetNtpClientRetryInterval   ( int   value) { NtpClientQueryRetryInterval      = (int32_t)value ; FramWrite(iRetryInterval,                      4, &NtpClientQueryRetryInterval   ); }