فهرست منبع

Fix voltage value in Stop mode.

Vladimir N. Shilov 2 سال پیش
والد
کامیت
0dc9e4cd04
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      src/main.c

+ 2 - 1
src/main.c

@@ -544,6 +544,7 @@ static void prepare_Screen(void) {
 
 
   /* clear bootom area */
   /* clear bootom area */
   gdispFillStringBox(1, 123, 318, 115, " ", font2, Red, Gray, gJustifyLeft);
   gdispFillStringBox(1, 123, 318, 115, " ", font2, Red, Gray, gJustifyLeft);
+  gdispFillStringBox(1, 213, 318, 29, "Stop", font2, Red, Silver, gJustifyCenter);
 
 
   /* create the console window */
   /* create the console window */
   {
   {
@@ -738,7 +739,7 @@ static void ina_Process(void) {
         chEvtBroadcast(&ina_all_event);
         chEvtBroadcast(&ina_all_event);
       } else {
       } else {
       /* Show bus voltage in STOP mode */
       /* Show bus voltage in STOP mode */
-        Voltage = sumVoltage;
+        Voltage = (sumVoltage + (INA_AVG_FACTOR/2)) / INA_AVG_FACTOR;
         sumCurrent=0;
         sumCurrent=0;
         sumVoltage=0;
         sumVoltage=0;