Обновление

This commit is contained in:
cfif 2025-12-18 13:31:11 +03:00
parent 35d3424462
commit afede8049c
4 changed files with 12 additions and 8 deletions

View File

@ -12,6 +12,7 @@ void Mma_Init(
tSerialPorts *serialPorts,
tLinPorts *linPorts,
tCanPorts *canPorts,
tStorageOnFlash *flash,
tRtcs *rtcs
) {
env->gpios = gpios;
@ -20,6 +21,7 @@ void Mma_Init(
env->canPorts = canPorts;
env->rtcs = rtcs;
env->adcs = adcs;
env->flash = flash;
InitThreadAtrStatic(&env->thread.attr, "Mma", env->thread.controlBlock, env->thread.stack, osPriorityNormal);
env->thread.id = 0;
@ -48,14 +50,14 @@ static _Noreturn void Mma_Thread(tMma *env) {
}
for (;;) {
/*
LoggerInfoStatic(&env->slog.logger, LOG_TASK_ARB, "Zorro...")
printf("Test Test Test Test Test Test Test Test Test Test XA XA ...\n");
GpioPinToggle(&env->gpios->led.LED1);
SystemDelayMs(500);
*/
/*
if (RGM_SRS_WAKEUP_MASK == (RGM->SRS & RGM_SRS_WAKEUP_MASK)) {
@ -78,6 +80,9 @@ static _Noreturn void Mma_Thread(tMma *env) {
LoggerFormatInfo(&env->slog.logger, LOG_TASK_ARB, "Temp2 = %d", temp2)
}
*/
/*
bool isBusy = true;
if (osMutexAcquire(env->linTaskActuator0.access, 5000) == osOK) {
if (env->linTaskActuator0.linCommandActuator[0].COM == LIN_ACT_CFR_NONE) {
@ -225,7 +230,7 @@ static _Noreturn void Mma_Thread(tMma *env) {
}
*/
/*

View File

@ -76,6 +76,7 @@ void Mma_Init(
tSerialPorts *serialPorts,
tLinPorts *linPorts,
tCanPorts *canPorts,
tStorageOnFlash *flash,
tRtcs *rtcs
);

View File

@ -29,8 +29,6 @@ void Mma_InitComIntLog(tMma *env) {
static void Mma_InitSubSystems(tMma *env) {
InitPeripheralInterfaces();
// Настройка таймера реального времени
time_t set_timestamp = 0;
RtcSet(&env->rtcs->rtcI0, &set_timestamp);
@ -39,8 +37,8 @@ static void Mma_InitSubSystems(tMma *env) {
LoggerInfoStatic(&env->slog.logger, LOG_TASK_MAIN, "Initialization of subsystems")
// bool result = DeviceStorage_Init(&env->storage, &env->flash->interface_calib, &env->flash->interface_param,
// &env->slog.logger);
bool result = DeviceStorage_Init(&env->storage, &env->flash->interface_calib, &env->flash->interface_param,
&env->slog.logger);
// Indication_Init(&env->Indication, HVAC_DEV_MODE_STARTUP);

View File

@ -20,6 +20,6 @@ void InitPeripheralInterfaces() {
Adcs_Init();
Rtcs_Init();
// StorageOnFlash_Init();
StorageOnFlash_Init();
// Pwms_Init();
}