Обновление
This commit is contained in:
parent
890f4c2ef5
commit
2551e8e83f
|
|
@ -37,6 +37,8 @@ void Mma_Init(
|
|||
}
|
||||
|
||||
|
||||
uint8_t dataR[1024 * 2];
|
||||
|
||||
static _Noreturn void Mma_Thread(tMma *env) {
|
||||
|
||||
// Инициализация периферийных интерфейсов
|
||||
|
|
@ -62,26 +64,32 @@ static _Noreturn void Mma_Thread(tMma *env) {
|
|||
bool isActuatorWorkBusy = false;
|
||||
|
||||
|
||||
// GpioPinSet(&env->gpios->led.LED1, true);
|
||||
// GpioPinSet(&env->gpios->led.LED1, false);
|
||||
for (;;) {
|
||||
//uint16_t len = SerialPortReceive(&env->serialPorts->SerialPortLog_Sniffer_IO, data, 1024, 1000);
|
||||
uint16_t len = SerialPortReceive(&env->serialPorts->SerialPortLog_IO, dataR, 1024, 1000);
|
||||
|
||||
if (len != 0) {
|
||||
//SerialPortTransmit(&env->serialPorts->cliVirtualPortOut_Io, data, len, 1000);
|
||||
SerialPortTransmit(&env->serialPorts->SerialPortLog_IO, dataR, len, 1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
env->pwms->pwmIo.run(env->pwms->pwmIo.env);
|
||||
|
||||
bool busy = true;
|
||||
|
||||
|
||||
for (;;) {
|
||||
|
||||
env->pwms->pwmIo.setActivePercent(env->pwms->pwmIo.env, 77);
|
||||
SystemDelayMs(10);
|
||||
uint8_t pwm = env->pwms->pwmCaptureIO.getPwm(env->pwms->pwmCaptureIO.env);
|
||||
LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "PWM = %d", pwm)
|
||||
//LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "PWM = %d", pwm)
|
||||
|
||||
env->pwms->pwmIo.setActivePercent(env->pwms->pwmIo.env, 22);
|
||||
SystemDelayMs(10);
|
||||
pwm = env->pwms->pwmCaptureIO.getPwm(env->pwms->pwmCaptureIO.env);
|
||||
LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "PWM = %d", pwm)
|
||||
//LoggerFormatInfo(LOGGER, LOG_TASK_ARB, "PWM = %d", pwm)
|
||||
|
||||
if (osMutexAcquire(env->linTaskActuator0.access, 5000) == osOK) {
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ static void Mma_InitSubSystems(tMma *env) {
|
|||
|
||||
// Indication_Init(&env->Indication, HVAC_DEV_MODE_STARTUP);
|
||||
|
||||
CommandLine_Init(&env->cli, &env->serialPorts->cliVirtualPortIn_Io, &env->serialPorts->cliVirtualPortOut_Io);
|
||||
CommandLine_StartThread(&env->cli);
|
||||
CommandLine_Init(&env->cli, &env->serialPorts->SerialPortLog_IO, &env->serialPorts->cliVirtualPortOut_Io);
|
||||
// CommandLine_StartThread(&env->cli);
|
||||
|
||||
CanSerialPortFrameXcpInit(
|
||||
&env->CanSerialPortFrameXCP,
|
||||
|
|
|
|||
Loading…
Reference in New Issue