Update firmware version to 1.0.10, add hv_tick parameter to PSU control, enhance serial control with response handling, and improve stop button control logic.

This commit is contained in:
2026-04-13 20:01:44 +03:00
parent 14b4f0595f
commit c59d150b23
21 changed files with 25914 additions and 25379 deletions
+28 -10
View File
@@ -2,6 +2,7 @@
#include "main.h"
#include "string.h"
#include "charger_control.h"
#include "board.h"
#include "tim.h"
@@ -10,11 +11,20 @@ RGB_Cycle_t LED_Cycle;
RGB_Cycle_t color_estop = {
.Color1 = { .R = 250, .G = 0, .B = 0 },
.Color2 = { .R = 250, .G = 0, .B = 0 },
.Tr = 50,
.Th = 50,
.Tf = 50,
.Tl = 50,
.Color2 = { .R = 0, .G = 0, .B = 0 },
.Tr = 10,
.Th = 5,
.Tf = 10,
.Tl = 5,
};
RGB_Cycle_t color_unlock = {
.Color1 = { .R = 255, .G = 0, .B = 0 },
.Color2 = { .R = 0, .G = 0, .B = 0 },
.Tr = 10,
.Th = 10,
.Tf = 10,
.Tl = 10,
};
RGB_Cycle_t color_unknown = {
@@ -54,12 +64,12 @@ RGB_Cycle_t color_unplugged = {
};
RGB_Cycle_t color_preparing = {
.Color1 = { .R = 0, .G = 0, .B = 250 },
.Color2 = { .R = 0, .G = 0, .B = 250 },
.Tr = 50,
.Color1 = { .R = 0, .G = 0, .B = 255 },
.Color2 = { .R = 0, .G = 0, .B = 0 },
.Tr = 10,
.Th = 10,
.Tf = 50,
.Tl = 0,
.Tf = 10,
.Tl = 10,
};
RGB_Cycle_t color_charging = {
@@ -94,6 +104,14 @@ void LED_Write(){
LED_SetColor(&color_error);
return;
}
if(CONN.connControl == CMD_FORCE_UNLOCK){
LED_SetColor(&color_unlock);
return;
}
if(CONN.connControl == CMD_STOP){
LED_SetColor(&color_estop);
return;
}
switch(CONN.connState){
case Unknown:
LED_SetColor(&color_unknown);