update the way that date send to uart. Add Flow route selection Algorithm

This commit is contained in:
不吃油炸鸡
2025-08-14 13:30:27 +08:00
parent e291e27c9c
commit f825971aee
4 changed files with 89 additions and 15 deletions

View File

@@ -15,11 +15,16 @@ extern "C" {
#define EN2_PORT GPIOA
#define EN2_PIN GPIO_PIN_15
//
// Flow route selection
#define HIGH_CUR 2
#define MID_CUR 1
#define LOW_CUR 0
// Resistance values in ohms
#define HIGH_CUR_RES 0.005 // 5 m ohm
#define MID_CUR_RES 0.5 // 500 m ohm
#define LOW_CUR_RES 50.0 // 50 ohm
void Gate_Port_Init(void);
void flow_route_selection(uint8_t selection);
uint8_t Gate_get_status(void);