Обновление
This commit is contained in:
parent
b0017f5da8
commit
a6bd95db57
|
|
@ -323,9 +323,12 @@ static _Noreturn void Mma_Thread(tMma *env) {
|
||||||
|
|
||||||
if (osMutexAcquire(env->adcTask0.access, 1000) == osOK) {
|
if (osMutexAcquire(env->adcTask0.access, 1000) == osOK) {
|
||||||
uint16_t adc_value = env->adcTask0.ADC0_Data.Sensor_Front_Duct1;
|
uint16_t adc_value = env->adcTask0.ADC0_Data.Sensor_Front_Duct1;
|
||||||
int16_t temp_incar = get_temperature_log_fast_for_table(adc_value, TABLE_INCAR);
|
int16_t temp_incar = get_temperature_log_fast_for_table(adc_value, TABLE_KST45);
|
||||||
LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "Sensor_Front_Duct1: ADC = %u, Temp = %.2f °C", adc_value,
|
float resistance = get_resistance_log_fast_for_table(temp_incar, TABLE_KST45);
|
||||||
temp_incar / 10.0f)
|
float U = (float) adc_value * 5.0f / 4095.0f;
|
||||||
|
|
||||||
|
LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "Sensor_Front_Duct1: ADC = %u, Temp = %.2f °C, Resistance = %.2f Ohm U = %.2f",
|
||||||
|
adc_value, temp_incar / 10.0f, resistance, U)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue