Forráskód Böngészése

2020.06.05 / TC Hsu

Actions: Implement LED board upgrade featrue for DM30/DW30

Image version    : N/A
Image checksum   : N/A

Hardware PWB P/N : N/A
Hardware Version : N/A

Files:

	modified:   EVSE/Projects/DM30/Apps/main.c
	modified:   EVSE/Projects/DW30/Apps/main.c
TC_Hsu 4 éve
szülő
commit
fd45a1d9d5
2 módosított fájl, 16 hozzáadás és 2 törlés
  1. 8 1
      EVSE/Projects/DM30/Apps/main.c
  2. 8 1
      EVSE/Projects/DW30/Apps/main.c

+ 8 - 1
EVSE/Projects/DM30/Apps/main.c

@@ -51,6 +51,7 @@
 #define UPGRADE_RB          0x03
 #define UPGRADE_PRI         0x04
 #define UPGRADE_AC          0x05
+#define UPGRADE_LED         0x06
 #define SYSTEM_MIN_VOL      150
 
 #define NO_DEFINE           255
@@ -186,7 +187,10 @@ int InitComPort(byte target)
 
     if(target == UPGRADE_PRI)
         fd = open(_priPortName, O_RDWR);
-    else if (target == UPGRADE_FAN ||  target == UPGRADE_RB || target == UPGRADE_AC)
+    else if (target == UPGRADE_FAN  ||
+             target == UPGRADE_RB   ||
+             target == UPGRADE_AC   ||
+             target == UPGRADE_LED)
         fd = open(_485PortName, O_RDWR);
 
     if(fd<=0)
@@ -3076,6 +3080,7 @@ char CheckUpdateProcess()
                     case RELAY_CONTROL_BOARD:
                     case FAN_CONTROL_BOARD:
                     case AC_WALLMOUNT_CONTROLLER:
+                    case LED_BOARD:
                     {
                         byte target = 0x00;
 
@@ -3087,6 +3092,8 @@ char CheckUpdateProcess()
                             target = UPGRADE_FAN;
                         else if (Type == AC_WALLMOUNT_CONTROLLER)
                             target = UPGRADE_AC;
+                        else if (Type == LED_BOARD)
+                            target = UPGRADE_LED;
 
                         int fd = InitComPort(target);
 

+ 8 - 1
EVSE/Projects/DW30/Apps/main.c

@@ -51,6 +51,7 @@
 #define UPGRADE_RB          0x03
 #define UPGRADE_PRI         0x04
 #define UPGRADE_AC          0x05
+#define UPGRADE_LED         0x06
 #define SYSTEM_MIN_VOL      150
 
 #define NO_DEFINE           255
@@ -186,7 +187,10 @@ int InitComPort(byte target)
 
     if(target == UPGRADE_PRI)
         fd = open(_priPortName, O_RDWR);
-    else if (target == UPGRADE_FAN ||  target == UPGRADE_RB || target == UPGRADE_AC)
+    else if (target == UPGRADE_FAN  ||
+             target == UPGRADE_RB   ||
+             target == UPGRADE_AC   ||
+             target == UPGRADE_LED)
         fd = open(_485PortName, O_RDWR);
 
     if(fd<=0)
@@ -3076,6 +3080,7 @@ char CheckUpdateProcess()
                     case RELAY_CONTROL_BOARD:
                     case FAN_CONTROL_BOARD:
                     case AC_WALLMOUNT_CONTROLLER:
+                    case LED_BOARD:
                     {
                         byte target = 0x00;
 
@@ -3087,6 +3092,8 @@ char CheckUpdateProcess()
                             target = UPGRADE_FAN;
                         else if (Type == AC_WALLMOUNT_CONTROLLER)
                             target = UPGRADE_AC;
+                        else if (Type == LED_BOARD)
+                            target = UPGRADE_LED;
 
                         int fd = InitComPort(target);