Обновление
This commit is contained in:
parent
6ceda31990
commit
99abc64af8
|
|
@ -122,50 +122,54 @@ void LoadDataInFromModel(tMma *env) {
|
|||
*/
|
||||
|
||||
// R1 = 91000 R2 = 20000 ((5 * (91000 + 20000)) / 20000 = 27.75 В)
|
||||
float U_IGN_CHECK = ((float) env->adcTask0.ADC0_Data.IGN_ANS * 27.75f) / 4095.0f;
|
||||
LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "U_IGN_CHECK = %f", U_IGN_CHECK)
|
||||
// float U_IGN_CHECK = ((float) env->adcTask0.ADC0_Data.IGN_ANS * 27.75f) / 4095.0f;
|
||||
// LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "U_IGN_CHECK = %f", U_IGN_CHECK)
|
||||
|
||||
BTS5180_120(env, "BTS5120_2EKA_ShutoffValvePowerTXV1",
|
||||
env->adcTask0.ADC0_Data.BTS5120_2EKA_ShutoffValvePowerTXV1);
|
||||
BTS5180_120(env, "BTS5120_2EKA_ShutoffValvePowerTXV2",
|
||||
env->adcTask0.ADC0_Data.BTS5120_2EKA_ShutoffValvePowerTXV2);
|
||||
// BTS5180_120(env, "BTS5120_2EKA_ShutoffValvePowerTXV1",
|
||||
// env->adcTask0.ADC0_Data.BTS5120_2EKA_ShutoffValvePowerTXV1);
|
||||
// BTS5180_120(env, "BTS5120_2EKA_ShutoffValvePowerTXV2",
|
||||
// env->adcTask0.ADC0_Data.BTS5120_2EKA_ShutoffValvePowerTXV2);
|
||||
|
||||
BTS5180_120(env, "BTS5180_2EKA_ShutOFFValveFront", env->adcTask0.ADC0_Data.BTS5180_2EKA_ShutOFFValveFront);
|
||||
BTS5180_120(env, "BTS5180_2EKA_ShutOFFValveRear", env->adcTask0.ADC0_Data.BTS5180_2EKA_ShutOFFValveRear);
|
||||
// BTS5180_120(env, "BTS5180_2EKA_ShutOFFValveFront", env->adcTask0.ADC0_Data.BTS5180_2EKA_ShutOFFValveFront);
|
||||
// BTS5180_120(env, "BTS5180_2EKA_ShutOFFValveRear", env->adcTask0.ADC0_Data.BTS5180_2EKA_ShutOFFValveRear);
|
||||
|
||||
BTS5180_120(env, "BTS5180_2EKA_TwoWayValve", env->adcTask0.ADC0_Data.BTS5180_2EKA_TwoWayValve);
|
||||
BTS5180_120(env, "BTS5180_2EKA_ReservePowerSupply",
|
||||
env->adcTask0.ADC0_Data.BTS5180_2EKA_ReservePowerSupply);
|
||||
// BTS5180_120(env, "BTS5180_2EKA_TwoWayValve", env->adcTask0.ADC0_Data.BTS5180_2EKA_TwoWayValve);
|
||||
// BTS5180_120(env, "BTS5180_2EKA_ReservePowerSupply",
|
||||
// env->adcTask0.ADC0_Data.BTS5180_2EKA_ReservePowerSupply);
|
||||
|
||||
BTS5180_120(env, "BTS5180_2EKA_FrontIncarMotor", env->adcTask0.ADC0_Data.BTS5180_2EKA_FrontIncarMotor);
|
||||
BTS5180_120(env, "BTS5180_2EKA_RearIncarMotor", env->adcTask0.ADC0_Data.BTS5180_2EKA_RearIncarMotor);
|
||||
// BTS5180_120(env, "BTS5180_2EKA_FrontIncarMotor", env->adcTask0.ADC0_Data.BTS5180_2EKA_FrontIncarMotor);
|
||||
// BTS5180_120(env, "BTS5180_2EKA_RearIncarMotor", env->adcTask0.ADC0_Data.BTS5180_2EKA_RearIncarMotor);
|
||||
|
||||
BTS5180_120(env, "BTS5180_2EKA_ChannelPTCPower1", env->adcTask0.ADC0_Data.BTS5180_2EKA_ChannelPTCPower1);
|
||||
BTS5180_120(env, "BTS5180_2EKA_ChannelPTCPower2", env->adcTask0.ADC0_Data.BTS5180_2EKA_ChannelPTCPower2);
|
||||
// BTS5180_120(env, "BTS5180_2EKA_ChannelPTCPower1", env->adcTask0.ADC0_Data.BTS5180_2EKA_ChannelPTCPower1);
|
||||
// BTS5180_120(env, "BTS5180_2EKA_ChannelPTCPower2", env->adcTask0.ADC0_Data.BTS5180_2EKA_ChannelPTCPower2);
|
||||
|
||||
ANALOG_SENSOR(env, "Sensor_Ambient_Temp", env->adcTask0.ADC0_Data.Sensor_Ambient_Temp);
|
||||
ANALOG_SENSOR(env, "Sensor_AC_Pressure", env->adcTask0.ADC0_Data.Sensor_AC_Pressure);
|
||||
ANALOG_SENSOR(env, "Sensor_Incar_Temp_FL", env->adcTask0.ADC0_Data.Sensor_Incar_Temp_FL);
|
||||
ANALOG_SENSOR(env, "Sensor_Incar_Temp_RL", env->adcTask0.ADC0_Data.Sensor_Incar_Temp_RL);
|
||||
ANALOG_SENSOR(env, "Sensor_Rear_Evap_Temp", env->adcTask0.ADC0_Data.Sensor_Rear_Evap_Temp);
|
||||
ANALOG_SENSOR(env, "Sensor_Evap_Temp", env->adcTask0.ADC0_Data.Sensor_Evap_Temp);
|
||||
ANALOG_SENSOR(env, "Sensor_Rear_Duct1", env->adcTask0.ADC0_Data.Sensor_Rear_Duct1);
|
||||
ANALOG_SENSOR(env, "Sensor_Rear_Duct2", env->adcTask0.ADC0_Data.Sensor_Rear_Duct2);
|
||||
ANALOG_SENSOR(env, "Sensor_Front_Duct1", env->adcTask0.ADC0_Data.Sensor_Front_Duct1);
|
||||
ANALOG_SENSOR(env, "Sensor_Front_Duct2", env->adcTask0.ADC0_Data.Sensor_Front_Duct2);
|
||||
ANALOG_SENSOR(env, "Sensor_Front_Duct3", env->adcTask0.ADC0_Data.Sensor_Front_Duct3);
|
||||
ANALOG_SENSOR(env, "Sensor_Front_Duct4", env->adcTask0.ADC0_Data.Sensor_Front_Duct4);
|
||||
ANALOG_SENSOR(env, "Sensor_Rear_Duct3", env->adcTask0.ADC0_Data.Sensor_Rear_Duct3);
|
||||
ANALOG_SENSOR(env, "Sensor_Rear_Duct4", env->adcTask0.ADC0_Data.Sensor_Rear_Duct4);
|
||||
ANALOG_SENSOR(env, "Sensor_Incar_Temp_FR", env->adcTask0.ADC0_Data.Sensor_Incar_Temp_FR);
|
||||
ANALOG_SENSOR(env, "Sensor_Incar_Temp_RR", env->adcTask0.ADC0_Data.Sensor_Incar_Temp_RR);
|
||||
ANALOG_SENSOR(env, "Sensor_Rear_Duct5", env->adcTask0.ADC0_Data.Sensor_Rear_Duct5);
|
||||
ANALOG_SENSOR(env, "Sensor_Rear_Duct6", env->adcTask0.ADC0_Data.Sensor_Rear_Duct6);
|
||||
ANALOG_SENSOR(env, "Reserve_Sensor_Duct_Temp_1", env->adcTask0.ADC0_Data.Reserve_Sensor_Duct_Temp_1);
|
||||
ANALOG_SENSOR(env, "Sensor_Front_Duct5", env->adcTask0.ADC0_Data.Sensor_Front_Duct5);
|
||||
ANALOG_SENSOR(env, "Sensor_Front_Duct6", env->adcTask0.ADC0_Data.Sensor_Front_Duct6);
|
||||
ANALOG_SENSOR(env, "Pressure_DIAG", env->adcTask0.ADC0_Data.Pressure_DIAG);
|
||||
ANALOG_SENSOR(env, "Reserve_Sensor_Duct_Temp_2", env->adcTask0.ADC0_Data.Reserve_Sensor_Duct_Temp_2);
|
||||
// ANALOG_SENSOR(env, "Sensor_Ambient_Temp", env->adcTask0.ADC0_Data.Sensor_Ambient_Temp);
|
||||
// ANALOG_SENSOR(env, "Sensor_AC_Pressure", env->adcTask0.ADC0_Data.Sensor_AC_Pressure);
|
||||
// ANALOG_SENSOR(env, "Sensor_Incar_Temp_FL", env->adcTask0.ADC0_Data.Sensor_Incar_Temp_FL);
|
||||
// ANALOG_SENSOR(env, "Sensor_Incar_Temp_RL", env->adcTask0.ADC0_Data.Sensor_Incar_Temp_RL);
|
||||
// ANALOG_SENSOR(env, "Sensor_Rear_Evap_Temp", env->adcTask0.ADC0_Data.Sensor_Rear_Evap_Temp);
|
||||
// ANALOG_SENSOR(env, "Sensor_Evap_Temp", env->adcTask0.ADC0_Data.Sensor_Evap_Temp);
|
||||
// ANALOG_SENSOR(env, "Sensor_Rear_Duct1", env->adcTask0.ADC0_Data.Sensor_Rear_Duct1);
|
||||
// ANALOG_SENSOR(env, "Sensor_Rear_Duct2", env->adcTask0.ADC0_Data.Sensor_Rear_Duct2);
|
||||
// ANALOG_SENSOR(env, "Sensor_Front_Duct1", env->adcTask0.ADC0_Data.Sensor_Front_Duct1);
|
||||
// ANALOG_SENSOR(env, "Sensor_Front_Duct2", env->adcTask0.ADC0_Data.Sensor_Front_Duct2);
|
||||
// ANALOG_SENSOR(env, "Sensor_Front_Duct3", env->adcTask0.ADC0_Data.Sensor_Front_Duct3);
|
||||
// ANALOG_SENSOR(env, "Sensor_Front_Duct4", env->adcTask0.ADC0_Data.Sensor_Front_Duct4);
|
||||
// ANALOG_SENSOR(env, "Sensor_Rear_Duct3", env->adcTask0.ADC0_Data.Sensor_Rear_Duct3);
|
||||
// ANALOG_SENSOR(env, "Sensor_Rear_Duct4", env->adcTask0.ADC0_Data.Sensor_Rear_Duct4);
|
||||
// ANALOG_SENSOR(env, "Sensor_Incar_Temp_FR", env->adcTask0.ADC0_Data.Sensor_Incar_Temp_FR);
|
||||
// ANALOG_SENSOR(env, "Sensor_Incar_Temp_RR", env->adcTask0.ADC0_Data.Sensor_Incar_Temp_RR);
|
||||
// ANALOG_SENSOR(env, "Sensor_Rear_Duct5", env->adcTask0.ADC0_Data.Sensor_Rear_Duct5);
|
||||
// ANALOG_SENSOR(env, "Sensor_Rear_Duct6", env->adcTask0.ADC0_Data.Sensor_Rear_Duct6);
|
||||
// ANALOG_SENSOR(env, "Reserve_Sensor_Duct_Temp_1", env->adcTask0.ADC0_Data.Reserve_Sensor_Duct_Temp_1);
|
||||
// ANALOG_SENSOR(env, "Sensor_Front_Duct5", env->adcTask0.ADC0_Data.Sensor_Front_Duct5);
|
||||
// ANALOG_SENSOR(env, "Sensor_Front_Duct6", env->adcTask0.ADC0_Data.Sensor_Front_Duct6);
|
||||
|
||||
// R1 = 10000 R2 = 47000 ((5 * (10000 + 47000)) / 47000 = 6.0638 В)
|
||||
// float Pressure_DIAG = ((float) env->adcTask0.ADC0_Data.Pressure_DIAG * 6.0638f) / 4095.0f;
|
||||
// LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "Pressure_DIAG = %f", Pressure_DIAG)
|
||||
|
||||
// ANALOG_SENSOR(env, "Reserve_Sensor_Duct_Temp_2", env->adcTask0.ADC0_Data.Reserve_Sensor_Duct_Temp_2);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -179,23 +183,23 @@ void LoadDataInFromModel(tMma *env) {
|
|||
env->adcTask1.ADC_isUpdate = false;
|
||||
|
||||
// R1 = 91000 R2 = 16000 ((5 * (91000 + 16000)) / 16000 = 33.4375 В)
|
||||
float U_PBATT_CHECK = ((float) env->adcTask1.ADC1_Data.PBATT_CHECK * 33.4375f) / 4095.0f;
|
||||
LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "U_PBATT_CHECK = %f", U_PBATT_CHECK)
|
||||
// float U_PBATT_CHECK = ((float) env->adcTask1.ADC1_Data.PBATT_CHECK * 33.4375f) / 4095.0f;
|
||||
// LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "U_PBATT_CHECK = %f", U_PBATT_CHECK)
|
||||
|
||||
// R1 = 30000 R2 = 12000 ((5 * (30000 + 12000)) / 12000 = 17.5 В)
|
||||
float U_VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB =
|
||||
((float) env->adcTask0.ADC0_Data.VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB * 17.5f) / 4095.0f;
|
||||
LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "U_VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB = %f",
|
||||
U_VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB)
|
||||
// float U_VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB =
|
||||
// ((float) env->adcTask1.ADC1_Data.VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB * 17.5f) / 4095.0f;
|
||||
// LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "U_VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB = %f",
|
||||
// U_VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB)
|
||||
|
||||
// R1 = 30000 R2 = 12000 ((5 * (30000 + 12000)) / 12000 = 17.5 В)
|
||||
float U_VN7008AJ_DIAG_RearLINActuatorPowerDriverC =
|
||||
((float) env->adcTask0.ADC0_Data.VN7008AJ_DIAG_RearLINActuatorPowerDriverC * 17.5f) / 4095.0f;
|
||||
LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "U_VN7008AJ_DIAG_RearLINActuatorPowerDriverC = %f",
|
||||
U_VN7008AJ_DIAG_RearLINActuatorPowerDriverC)
|
||||
// float U_VN7008AJ_DIAG_RearLINActuatorPowerDriverC =
|
||||
// ((float) env->adcTask1.ADC1_Data.VN7008AJ_DIAG_RearLINActuatorPowerDriverC * 17.5f) / 4095.0f;
|
||||
// LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "U_VN7008AJ_DIAG_RearLINActuatorPowerDriverC = %f",
|
||||
// U_VN7008AJ_DIAG_RearLINActuatorPowerDriverC)
|
||||
|
||||
VN7008AJ(env, "VN7008AJ_FrontLINActuatorPowerDriverAB", env->adcTask1.ADC1_Data.VN7008AJ_FrontLINActuatorPowerDriverAB);
|
||||
VN7008AJ(env, "VN7008AJ_RearLINActuatorPowerDriverC", env->adcTask1.ADC1_Data.VN7008AJ_RearLINActuatorPowerDriverC);
|
||||
// VN7008AJ(env, "VN7008AJ_FrontLINActuatorPowerDriverAB", env->adcTask1.ADC1_Data.VN7008AJ_FrontLINActuatorPowerDriverAB);
|
||||
// VN7008AJ(env, "VN7008AJ_RearLINActuatorPowerDriverC", env->adcTask1.ADC1_Data.VN7008AJ_RearLINActuatorPowerDriverC);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -213,7 +217,7 @@ void LoadDataInFromModel(tMma *env) {
|
|||
|
||||
if (env->ModelTask.isUpdate) {
|
||||
env->ModelTask.isUpdate = false;
|
||||
set_CCU_Errors(&env->canSpamTransmitter, (CCU_Errors_t *)&CCU_Errors_Model);
|
||||
set_CCU_Errors(&env->canSpamTransmitter, (CCU_Errors_t *) &CCU_Errors_Model);
|
||||
}
|
||||
|
||||
osMutexRelease(env->ModelTask.access);
|
||||
|
|
@ -239,7 +243,7 @@ static _Noreturn void Mma_Thread(tMma *env) {
|
|||
|
||||
LoadDataInFromModel(env);
|
||||
|
||||
ModelTask_StartThread(&env->ModelTask);
|
||||
// ModelTask_StartThread(&env->ModelTask);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -55,12 +55,12 @@ static void Mma_InitSubSystems(tMma *env) {
|
|||
bool result = DeviceStorage_Init(&env->storage, false, &env->flash->interface_calib, &env->flash->interface_param,
|
||||
&env->slog.logger);
|
||||
|
||||
|
||||
// Контроль напряжения борт-сети (0 - ВКЛ)
|
||||
GpioPinSet(&env->gpios->power.PBATT_CK_EN, true);
|
||||
// Включение 5V (0 - ВКЛ)
|
||||
GpioPinSet(&env->gpios->power.SW5V_EN, false);
|
||||
|
||||
// Контроль напряжения борт-сети (1 - ВКЛ)
|
||||
GpioPinSet(&env->gpios->power.PBATT_CK_EN, true);
|
||||
|
||||
GpioPinSet(&env->gpios->power.BTS5180_2EKA_FrontRearIncarMotor.Incar_Motor_Front_EN, true);
|
||||
GpioPinSet(&env->gpios->power.BTS5180_2EKA_FrontRearIncarMotor.Incar_EN_Diag, true);
|
||||
GpioPinSet(&env->gpios->power.BTS5180_2EKA_FrontRearIncarMotor.Incar_Motor_Rear_EN, true);
|
||||
|
|
@ -69,10 +69,21 @@ static void Mma_InitSubSystems(tMma *env) {
|
|||
GpioPinSet(&env->gpios->power.BTS5180_2EKA_TwoWayValveAndReservePowerSupply.TwoWayValve_EN_Diag, true);
|
||||
GpioPinSet(&env->gpios->power.BTS5180_2EKA_TwoWayValveAndReservePowerSupply.ReservePower_EN, true);
|
||||
|
||||
GpioPinSet(&env->gpios->power.BTS4175SGAXUMA1_ReservePowerOutput.EN_ReservePower, true);
|
||||
|
||||
GpioPinSet(&env->gpios->power.BTS5180_2EKA_2xChannelPTCPower.PtcRelayDriver1_EN, true);
|
||||
GpioPinSet(&env->gpios->power.BTS5180_2EKA_2xChannelPTCPower.PtcRelayDriver_EN_Diag, true);
|
||||
GpioPinSet(&env->gpios->power.BTS5180_2EKA_2xChannelPTCPower.PtcRelayDriver2_EN, true);
|
||||
|
||||
GpioPinSet(&env->gpios->power.VN7008AJ_FrontLINActuatorPowerDriverAB.LIN_ActPower_AB, true);
|
||||
GpioPinSet(&env->gpios->power.VN7008AJ_FrontLINActuatorPowerDriverAB.EN_CurrentSensing_AB, true);
|
||||
|
||||
GpioPinSet(&env->gpios->power.VN7008AJ_RearLINActuatorPowerDriverC.LIN_ActPower_C, true);
|
||||
GpioPinSet(&env->gpios->power.VN7008AJ_RearLINActuatorPowerDriverC.EN_CurrentSensing_C, true);
|
||||
|
||||
GpioPinSet(&env->gpios->power.BTS4175SGAXUMA1_ShutOFFValveBatteryChiller.EN_BATTChiller, true);
|
||||
|
||||
|
||||
GpioPinSet(&env->gpios->power.BTS5180_2EKA_ShutOFFValveFrontRear.ShutOffFront_EN, true);
|
||||
GpioPinSet(&env->gpios->power.BTS5180_2EKA_ShutOFFValveFrontRear.ShutOff_EN_Diag, true);
|
||||
GpioPinSet(&env->gpios->power.BTS5180_2EKA_ShutOFFValveFrontRear.ShutOffRear_EN, true);
|
||||
|
|
@ -81,17 +92,6 @@ static void Mma_InitSubSystems(tMma *env) {
|
|||
GpioPinSet(&env->gpios->power.BTS5120_2EKA_ShutoffValvePowerTXV.ShutOffTXV_EN_Diag, true);
|
||||
GpioPinSet(&env->gpios->power.BTS5120_2EKA_ShutoffValvePowerTXV.ShutOffTXV2_EN, true);
|
||||
|
||||
GpioPinSet(&env->gpios->power.BTS4175SGAXUMA1_ReservePowerOutput.EN_ReservePower, true);
|
||||
GpioPinSet(&env->gpios->power.BTS4175SGAXUMA1_ShutOFFValveBatteryChiller.EN_BATTChiller, true);
|
||||
|
||||
GpioPinSet(&env->gpios->power.VN7008AJ_FrontLINActuatorPowerDriverAB.LIN_ActPower_AB, true);
|
||||
GpioPinSet(&env->gpios->power.VN7008AJ_FrontLINActuatorPowerDriverAB.EN_CurrentSensing_AB, true);
|
||||
|
||||
GpioPinSet(&env->gpios->power.VN7008AJ_RearLINActuatorPowerDriverC.LIN_ActPower_C, true);
|
||||
GpioPinSet(&env->gpios->power.VN7008AJ_RearLINActuatorPowerDriverC.EN_CurrentSensing_C, true);
|
||||
|
||||
|
||||
|
||||
// Indication_Init(&env->Indication, HVAC_DEV_MODE_STARTUP);
|
||||
|
||||
CommandLine_Init(&env->cli, &env->serialPorts->SerialPortLog_IO, &env->serialPorts->cliVirtualPortOut_Io);
|
||||
|
|
|
|||
Loading…
Reference in New Issue