更改电流切换逻辑

This commit is contained in:
不吃油炸鸡
2025-10-18 11:25:33 +08:00
parent 3c6e3539ef
commit 5e4040aad4
4 changed files with 65 additions and 62 deletions

View File

@@ -52,9 +52,9 @@ void HardwareInitTask(void *argument)
// HAL_UART_Transmit_DMA(&huart6,(uint8_t *)"power-pico\r\n",13);
// queue for voltage and current
global_voltage_queue = queue_create(8);
global_current_queue = queue_create(8);
for(int i = 0; i < 8; i++) {
global_voltage_queue = queue_create(32);
global_current_queue = queue_create(32);
for(int i = 0; i < 32; i++) {
queue_push(global_voltage_queue, 0.0);
queue_push(global_current_queue, 0.0);
}