转速模式增加馈电PID

This commit is contained in:
2025-07-23 11:46:22 +08:00
parent cdc62d856d
commit 9a98344f85
4 changed files with 232 additions and 343 deletions

View File

@@ -184,6 +184,9 @@ static void tempProcess(void *signal_id)
max_temp[0] = temp_data.current_temp[0];
max_temp[1] = temp_data.current_temp[1];
max_temp[2] = temp_data.current_temp[2];
max_temp[3] = temp_data.current_temp[3];
// printf("motor1 temp: %d, motor2 temp: %d\n", max_temp[0], max_temp[1]);
handleTemperatureAlarm(max_temp[0], MOTOR_WARNING_TEMP, MOTOR_CRITICAL_TEMP, MOTOR_THRESHOLD_TEMP, &temp_data.state[0]);
@@ -239,19 +242,19 @@ static void tempInput(void *signal_id)
// 填充数据
if (signal_id == &un_motor_temp1)
{
temp_data.current_temp[0] = ( (int16_t)(un_motor_temp1.bit_data.controller_temp) - 40);//40偏移量
temp_data.current_temp[0] = (int16_t)( (un_motor_temp1.bit_data.controller_temp) - 40 );//40偏移量
}
else if(signal_id == &un_motor_temp2)
{
temp_data.current_temp[1] = ( (int16_t)(un_motor_temp2.bit_data.controller_temp) - 40);
temp_data.current_temp[1] = (int16_t)( (un_motor_temp2.bit_data.controller_temp) - 40 );
}
else if(signal_id == &un_motor_temp3)
{
temp_data.current_temp[2] = ( (int16_t)(un_motor_temp3.bit_data.controller_temp) - 40);
temp_data.current_temp[2] = (int16_t)( (un_motor_temp3.bit_data.controller_temp) - 40 );
}
else if(signal_id == &un_motor_temp4)
{
temp_data.current_temp[3] = ( (int16_t)(un_motor_temp4.bit_data.controller_temp) - 40);
temp_data.current_temp[3] = (int16_t)( (un_motor_temp4.bit_data.controller_temp) - 40 );
}
else{}
}