Обновление
This commit is contained in:
parent
fba7e7bedc
commit
aeead60971
|
|
@ -18,6 +18,7 @@ void Mma_Init(
|
||||||
tLinPorts *linPorts,
|
tLinPorts *linPorts,
|
||||||
tCanPorts *canPorts,
|
tCanPorts *canPorts,
|
||||||
tStorageOnFlash *flash,
|
tStorageOnFlash *flash,
|
||||||
|
tPwms *pwms,
|
||||||
tRtcs *rtcs
|
tRtcs *rtcs
|
||||||
) {
|
) {
|
||||||
env->gpios = gpios;
|
env->gpios = gpios;
|
||||||
|
|
@ -27,6 +28,7 @@ void Mma_Init(
|
||||||
env->rtcs = rtcs;
|
env->rtcs = rtcs;
|
||||||
env->adcs = adcs;
|
env->adcs = adcs;
|
||||||
env->flash = flash;
|
env->flash = flash;
|
||||||
|
env->pwms = pwms;
|
||||||
|
|
||||||
InitThreadAtrStatic(&env->thread.attr, "Mma", env->thread.controlBlock, env->thread.stack, osPriorityNormal);
|
InitThreadAtrStatic(&env->thread.attr, "Mma", env->thread.controlBlock, env->thread.stack, osPriorityNormal);
|
||||||
env->thread.id = 0;
|
env->thread.id = 0;
|
||||||
|
|
@ -48,14 +50,21 @@ static _Noreturn void Mma_Thread(tMma *env) {
|
||||||
LoggerInfoStatic(&env->slog.logger, LOG_TASK_ARB, "Wake up from standby")
|
LoggerInfoStatic(&env->slog.logger, LOG_TASK_ARB, "Wake up from standby")
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemDelayMs(1000);
|
// SystemDelayMs(1000);
|
||||||
|
|
||||||
ModelTask_StartThread(&env->ModelTask);
|
ModelTask_StartThread(&env->ModelTask);
|
||||||
|
|
||||||
bool isActuatorWorkBusy = false;
|
bool isActuatorWorkBusy = false;
|
||||||
|
|
||||||
|
// env->pwms->pwmIo.run(env->pwms->pwmIo.env);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
if (osMutexAcquire(env->linTaskActuator0.access, 5000) == osOK) {
|
if (osMutexAcquire(env->linTaskActuator0.access, 5000) == osOK) {
|
||||||
|
|
||||||
if (env->linTaskActuator0.busy == 0) {
|
if (env->linTaskActuator0.busy == 0) {
|
||||||
|
|
@ -122,7 +131,18 @@ static _Noreturn void Mma_Thread(tMma *env) {
|
||||||
osMutexRelease(env->ModelTask.access);
|
osMutexRelease(env->ModelTask.access);
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemDelayMs(100);
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ typedef struct {
|
||||||
tCanPorts *canPorts;
|
tCanPorts *canPorts;
|
||||||
tLoggerToSerialPort slog;
|
tLoggerToSerialPort slog;
|
||||||
tStorageOnFlash *flash;
|
tStorageOnFlash *flash;
|
||||||
|
tPwms *pwms;
|
||||||
|
|
||||||
tRtcs *rtcs;
|
tRtcs *rtcs;
|
||||||
tAdcs *adcs;
|
tAdcs *adcs;
|
||||||
|
|
@ -82,6 +83,7 @@ void Mma_Init(
|
||||||
tLinPorts *linPorts,
|
tLinPorts *linPorts,
|
||||||
tCanPorts *canPorts,
|
tCanPorts *canPorts,
|
||||||
tStorageOnFlash *flash,
|
tStorageOnFlash *flash,
|
||||||
|
tPwms *pwms,
|
||||||
tRtcs *rtcs
|
tRtcs *rtcs
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,5 +21,5 @@ void InitPeripheralInterfaces() {
|
||||||
Adcs_Init();
|
Adcs_Init();
|
||||||
Rtcs_Init();
|
Rtcs_Init();
|
||||||
StorageOnFlash_Init();
|
StorageOnFlash_Init();
|
||||||
// Pwms_Init();
|
Pwms_Init();
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue