Pārlūkot izejas kodu

Battery test is back on.

Dmitry Telenkov 4 mēneši atpakaļ
vecāks
revīzija
dad0da2e4a
2 mainītis faili ar 8 papildinājumiem un 7 dzēšanām
  1. 1 1
      config/board_bt6711_v1.h
  2. 7 6
      modules/MegaTec/megatec.c

+ 1 - 1
config/board_bt6711_v1.h

@@ -309,6 +309,6 @@ typedef enum {
 #define SERVICE_CONTROLLER_IP  "192.168.0.12"
 
 #define UPS_BUZZER_OFF //выключение звукового сигнала ИБП
-//#define CHECK_LOAD_ENABLE //включение алгоритма проверки нагрузки на ИБП
+#define CHECK_LOAD_ENABLE //включение алгоритма проверки нагрузки на ИБП
 
 #endif /* BOARD_PRS_H */

+ 7 - 6
modules/MegaTec/megatec.c

@@ -239,8 +239,8 @@ bool ups_megatec_rx_pdu(void)
         return false;
     }
 
-    printf("UPS raw data: %s\r\n", ups_pdu.data);
-    printf("UPS raw data len: %d\r\n", ups_pdu.len);
+    // printf("UPS raw data: %s\r\n", ups_pdu.data);
+    // printf("UPS raw data len: %d\r\n", ups_pdu.len);
 
     return true;
 }
@@ -273,7 +273,7 @@ void ups_status_response(char *data)
     char value[20];
     float tmp;
     uint8_t len = 0;
-    printf("ups_status_response: %s\r\n", data);
+    // printf("ups_status_response: %s\r\n", data);
     if (data[0] != '(') {
         return;
     }
@@ -838,7 +838,7 @@ void ups_serial_response(char *data)
 
 void ups_protocol_id_response(char *data)
 {
-    printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n");
+    //printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n");
     DBG printf("ups_protocol_id_response: %s\r\n", data);
 
     UPS.Present = UPS_CONNECTED;
@@ -1327,8 +1327,8 @@ void request_task(void *params)
             }
         }
 
-        printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n");
-        printf("megatec_send: %u\r\n", megatec_send);
+        //printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n");
+        //printf("megatec_send: %u\r\n", megatec_send);
 
         if (megatec_send) {
             memset(ups_pdu.data, 0, UPS_PDU_MAX_LEN);
@@ -1538,6 +1538,7 @@ void AutoTestCallback(void)
     }
 
     if(!((UPS.Status >> 2) & 0x01)) {
+        // printf("Test command!!!!!!!!!!!!!!!!");
         int res = ups_metac_service_pdu(ups_test_10sec);
         set_act_source(AUTO_ACT);
     }