|
@@ -235,16 +235,16 @@ static THD_FUNCTION(Thread1, arg) {
|
|
|
|
|
|
case Decharge:
|
|
|
palClearLine(LINE_LED1);
|
|
|
- chThdSleepMilliseconds(700);
|
|
|
+ chThdSleepMilliseconds(900);
|
|
|
palSetLine(LINE_LED1);
|
|
|
- chThdSleepMilliseconds(300);
|
|
|
+ chThdSleepMilliseconds(100);
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
palClearLine(LINE_LED1);
|
|
|
- chThdSleepMilliseconds(300);
|
|
|
+ chThdSleepMilliseconds(100);
|
|
|
palSetLine(LINE_LED1);
|
|
|
- chThdSleepMilliseconds(700);
|
|
|
+ chThdSleepMilliseconds(900);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -470,6 +470,14 @@ int main(void) {
|
|
|
Timer.mm = tmp0 % 60;
|
|
|
|
|
|
gwinPrintf(GW1, "Pause after Charge_1\n");
|
|
|
+ tmp0 = (Capacity_I + 1800) / 3600;
|
|
|
+ tmp1 = tmp0 / 1000;
|
|
|
+ tmp2 = (tmp0 % 1000) / 10;
|
|
|
+ gwinPrintf(GW1, "CI/CP: %2u.%02u", tmp1, tmp2);
|
|
|
+ tmp0 = (Capacity_P + 1800) / 3600;
|
|
|
+ tmp1 = tmp0 / 1000;
|
|
|
+ tmp2 = (tmp0 % 1000) / 10;
|
|
|
+ gwinPrintf(GW1, "/%2u.%02u\n", tmp1, tmp2);
|
|
|
gdispFillStringBox(1, 213, 318, 29, "Pause 1", font2, Red, Silver, gJustifyCenter);
|
|
|
chVTSet(&mode_vt, CHRGR_PAUSE1_S, mode_vt_cb, (void *)Decharge);
|
|
|
break;
|
|
@@ -496,18 +504,20 @@ int main(void) {
|
|
|
dech_Capacity_P = Capacity_P;
|
|
|
dechTimer = Timer;
|
|
|
|
|
|
- tmp0 = (Capacity_I + 1800) / 3600;
|
|
|
- tmp1 = tmp0 / 1000;
|
|
|
- tmp2 = tmp0 % 1000;
|
|
|
- chsnprintf(buf, 15, "CI:%2d.%03uAh\n", tmp1, tmp2);
|
|
|
- gwinPrintf(GW1, buf);
|
|
|
-
|
|
|
tmp0 = CHRGR_PAUSE2_S / 60;
|
|
|
Timer.ss = CHRGR_PAUSE2_S % 60;
|
|
|
Timer.hh = tmp0 / 60;
|
|
|
Timer.mm = tmp0 % 60;
|
|
|
|
|
|
gwinPrintf(GW1, "Pause after Decharge\n");
|
|
|
+ tmp0 = (Capacity_I + 1800) / 3600;
|
|
|
+ tmp1 = tmp0 / 1000;
|
|
|
+ tmp2 = (tmp0 % 1000) / 10;
|
|
|
+ gwinPrintf(GW1, "CI/CP: %2u.%02u", tmp1, tmp2);
|
|
|
+ tmp0 = (Capacity_P + 1800) / 3600;
|
|
|
+ tmp1 = tmp0 / 1000;
|
|
|
+ tmp2 = (tmp0 % 1000) / 10;
|
|
|
+ gwinPrintf(GW1, "/%2u.%02u\n", tmp1, tmp2);
|
|
|
gdispFillStringBox(1, 213, 318, 29, "Pause 2", font2, Red, Silver, gJustifyCenter);
|
|
|
chVTSet(&mode_vt, CHRGR_PAUSE2_S, mode_vt_cb, (void *)Charge2);
|
|
|
break;
|
|
@@ -538,6 +548,14 @@ int main(void) {
|
|
|
ch_Capacity_I = Capacity_I;
|
|
|
ch_Capacity_P = Capacity_P;
|
|
|
chTimer = Timer;
|
|
|
+ tmp0 = (Capacity_I + 1800) / 3600;
|
|
|
+ tmp1 = tmp0 / 1000;
|
|
|
+ tmp2 = (tmp0 % 1000) / 10;
|
|
|
+ gwinPrintf(GW1, "CI/CP: %2u.%02u", tmp1, tmp2);
|
|
|
+ tmp0 = (Capacity_P + 1800) / 3600;
|
|
|
+ tmp1 = tmp0 / 1000;
|
|
|
+ tmp2 = (tmp0 % 1000) / 10;
|
|
|
+ gwinPrintf(GW1, "/%2u.%02u\n", tmp1, tmp2);
|
|
|
}
|
|
|
oldState = Stop;
|
|
|
// power and load relay off
|