Monitor motorhome leisure battery and provide simple control of habitation

Dependencies:   net lpc1768 crypto clock web fram log

Revision:
9:d957af50fdc2
Parent:
3:b96c6f6bbffc
--- a/main/main.c	Mon May 10 08:45:07 2021 +0000
+++ b/main/main.c	Mon Jun 06 11:08:53 2022 +0000
@@ -5,9 +5,6 @@
 #include "log.h"
 #include "fram.h"
 #include "net.h"
-#include "1-wire.h"
-#include "1-wire-device.h"
-#include "heating.h"
 #include "settings.h"
 #include "web.h"
 #include "settings.h"
@@ -17,7 +14,8 @@
 #include "crypto.h"
 #include "i2c1.h"
 #include "lcd.h"
-#include "wiz.h"
+#include "can.h"
+#include "comms.h"
 
 int main()
 {
@@ -33,28 +31,24 @@
                 NetInit();
     if (SettingsNtpInit()) goto end; //Loads of FRAM
                 WebInit();           //No FRAM
-            OneWireInit();           //No FRAM
-             DeviceInit();           //No FRAM
-            HeatingInit();           //Loads of FRAM
     if (   SettingsInit()) goto end;
     if (     ValuesInit()) goto end;
                I2C1Init();
                 LcdInit();
-                WizInit();
+                CanInit();
+              CommsInit();
     while (1)
     {   
         RestartZone = RESTART_ZONE_LOG;              LogMain();
         RestartZone = RESTART_ZONE_CLOCK;            ClkMain();
         RestartZone = RESTART_ZONE_NET;              NetMain();
         RestartZone = RESTART_ZONE_VALUES;        ValuesMain();
-        RestartZone = RESTART_ZONE_ONE_WIRE; if (OneWireMain()) break;
-        RestartZone = RESTART_ZONE_DEVICE;   if ( DeviceMain()) break;
-        RestartZone = RESTART_ZONE_HEATING;      HeatingMain();
         RestartZone = RESTART_ZONE_LPC1768;      Lpc1768Main();
         RestartZone = RESTART_ZONE_CRYPTO;        CryptoMain();
         I2C1Main();
          LcdMain();
-         WizMain();
+         CanMain();
+       CommsMain();
     }
 
 end: