Обновление
This commit is contained in:
parent
65282d237c
commit
8e89210038
|
|
@ -23,7 +23,9 @@ void Mma_Init(
|
|||
env->thread.id = 0;
|
||||
}
|
||||
|
||||
#include "ADC_Temp_KST45-14-2.h"
|
||||
#include "ADC_Temp_Table.h"
|
||||
|
||||
#include "math.h"
|
||||
|
||||
const char LOG_TASK_ARB[] = "Arb";
|
||||
|
||||
|
|
@ -35,18 +37,27 @@ static _Noreturn void Mma_Thread(tMma *env) {
|
|||
can_rx_message_type frame_data;
|
||||
|
||||
uint32_t step = 0;
|
||||
int16_t temp = 0;
|
||||
int16_t temp1 = 0;
|
||||
int16_t temp2 = 0;
|
||||
|
||||
for (;;) {
|
||||
|
||||
SystemDelayMs(1000);
|
||||
|
||||
if (osMutexAcquire(env->adcTask1.access, 1000) == osOK) {
|
||||
temp = get_temperature_fast_KST45(env->adcTask1.ADC_Data[0]);
|
||||
temp1 = get_temperature_fast(env->adcTask1.ADC_Data[0], fast_lookup_Incar, 512);
|
||||
osMutexRelease(env->adcTask1.access);
|
||||
LoggerFormatInfo(&env->slog.logger, LOG_TASK_ARB, "Temp1 = %d", temp1)
|
||||
}
|
||||
|
||||
LoggerFormatInfo(&env->slog.logger, LOG_TASK_ARB, "Temp = %d", temp)
|
||||
|
||||
if (osMutexAcquire(env->adcTask1.access, 1000) == osOK) {
|
||||
temp2 = get_temperature_fast(env->adcTask1.ADC_Data[0], fast_lookup_KST45, 512);
|
||||
osMutexRelease(env->adcTask1.access);
|
||||
LoggerFormatInfo(&env->slog.logger, LOG_TASK_ARB, "Temp2 = %d", temp2)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ADC_Start(ADC_INSTANCE_0);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue