Обновление после командировки 29.06.2026
This commit is contained in:
parent
02c807eb8a
commit
0e7b59fe72
|
|
@ -13,11 +13,9 @@
|
||||||
|
|
||||||
void CanSpamDebugReceiver_Init(tCanSpamDebugReceiver *env,
|
void CanSpamDebugReceiver_Init(tCanSpamDebugReceiver *env,
|
||||||
tSerialPortFrameIO *ioCanFrame,
|
tSerialPortFrameIO *ioCanFrame,
|
||||||
osMutexId_t modelTaskAccess,
|
|
||||||
tLoggerInterface *logger) {
|
tLoggerInterface *logger) {
|
||||||
|
|
||||||
env->ioCanFrame = ioCanFrame;
|
env->ioCanFrame = ioCanFrame;
|
||||||
env->modelTaskAccess = modelTaskAccess;
|
|
||||||
env->logger = logger;
|
env->logger = logger;
|
||||||
env->access = osMutexNew(NULL);
|
env->access = osMutexNew(NULL);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@ typedef struct {
|
||||||
osMutexId_t access;
|
osMutexId_t access;
|
||||||
can_rx_message_type canFrame;
|
can_rx_message_type canFrame;
|
||||||
|
|
||||||
osMutexId_t modelTaskAccess;
|
|
||||||
|
|
||||||
tLoggerInterface *logger;
|
tLoggerInterface *logger;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|
@ -30,7 +28,7 @@ typedef struct {
|
||||||
|
|
||||||
} tCanSpamDebugReceiver;
|
} tCanSpamDebugReceiver;
|
||||||
|
|
||||||
void CanSpamDebugReceiver_Init(tCanSpamDebugReceiver *env, tSerialPortFrameIO *ioCanFrame, osMutexId_t modelTaskAccess, tLoggerInterface *logger);
|
void CanSpamDebugReceiver_Init(tCanSpamDebugReceiver *env, tSerialPortFrameIO *ioCanFrame, tLoggerInterface *logger);
|
||||||
|
|
||||||
void CanSpamDebugReceiver_StartThread(tCanSpamDebugReceiver *env);
|
void CanSpamDebugReceiver_StartThread(tCanSpamDebugReceiver *env);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,9 @@
|
||||||
void CanSpamDebugTransmitter_Init(tCanSpamDebugTransmitter *env,
|
void CanSpamDebugTransmitter_Init(tCanSpamDebugTransmitter *env,
|
||||||
tSerialPortFrameIO *ioCanFrame,
|
tSerialPortFrameIO *ioCanFrame,
|
||||||
tCanSpamDebugReceiver *canSpamDebugReceiver,
|
tCanSpamDebugReceiver *canSpamDebugReceiver,
|
||||||
osMutexId_t modelTaskAccess,
|
|
||||||
tLoggerInterface *logger) {
|
tLoggerInterface *logger) {
|
||||||
|
|
||||||
env->ioCanFrame = ioCanFrame;
|
env->ioCanFrame = ioCanFrame;
|
||||||
env->modelTaskAccess = modelTaskAccess;
|
|
||||||
env->logger = logger;
|
env->logger = logger;
|
||||||
env->canSpamDebugReceiver = canSpamDebugReceiver;
|
env->canSpamDebugReceiver = canSpamDebugReceiver;
|
||||||
env->access = osMutexNew(NULL);
|
env->access = osMutexNew(NULL);
|
||||||
|
|
@ -30,13 +28,14 @@ void CanSpamDebugTransmitter_Init(tCanSpamDebugTransmitter *env,
|
||||||
env->dbg_Auto_Duct_MultMsg_Idx = 0;
|
env->dbg_Auto_Duct_MultMsg_Idx = 0;
|
||||||
env->dbg_Auto_AF_MultMsg_Idx = 0;
|
env->dbg_Auto_AF_MultMsg_Idx = 0;
|
||||||
|
|
||||||
|
env->queue_ccu_candb_dbg_tx = osMessageQueueNew(1, sizeof(ccu_candb_dbg_tx_t), NULL);
|
||||||
|
|
||||||
InitThreadAtrStatic(&env->thread.attr, "CanSpamDebugTrans", env->thread.controlBlock, env->thread.stack,
|
InitThreadAtrStatic(&env->thread.attr, "CanSpamDebugTrans", env->thread.controlBlock, env->thread.stack,
|
||||||
osPriorityNormal);
|
osPriorityNormal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void sendEventToCan(tCanSpamDebugTransmitter *env) {
|
static void sendEventToCan(tCanSpamDebugTransmitter *env) {
|
||||||
|
|
||||||
if (env->ide) {
|
if (env->ide) {
|
||||||
env->canFrame.id_type = FLEXCAN_ID_EXT;
|
env->canFrame.id_type = FLEXCAN_ID_EXT;
|
||||||
env->canFrame.extended_id = env->can_id;
|
env->canFrame.extended_id = env->can_id;
|
||||||
|
|
@ -46,7 +45,7 @@ static void sendEventToCan(tCanSpamDebugTransmitter *env) {
|
||||||
}
|
}
|
||||||
|
|
||||||
env->ioCanFrame->transmit(env->ioCanFrame->env, (uint8_t *) &env->canFrame.data, env->canFrame.dlc,
|
env->ioCanFrame->transmit(env->ioCanFrame->env, (uint8_t *) &env->canFrame.data, env->canFrame.dlc,
|
||||||
env->can_id, env->canFrame.id_type, 100, SPAM_DEBUG_CAN_HANDLER);
|
env->can_id, env->canFrame.id_type, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -90,16 +89,16 @@ static eTimeEventDbgTransmit isEventTransmitter(tCanSpamDebugTransmitter *env) {
|
||||||
if (env->time_dbg_Auto_AF_CYC <= env->timeMs) {
|
if (env->time_dbg_Auto_AF_CYC <= env->timeMs) {
|
||||||
env->time_dbg_Auto_AF_CYC = env->timeMs + dbg_Auto_AF_CYC;
|
env->time_dbg_Auto_AF_CYC = env->timeMs + dbg_Auto_AF_CYC;
|
||||||
|
|
||||||
ccu_candb_dbg_tx.dbg_Auto_AF.dbg_Auto_AF_MultMsg_Idx = env->dbg_Auto_AF_MultMsg_Idx;
|
|
||||||
|
|
||||||
env->can_id = Pack_dbg_Auto_AF_candb_dbg2(&ccu_candb_dbg_tx.dbg_Auto_AF, env->canFrame.data,
|
|
||||||
&env->canFrame.dlc, &env->ide);
|
|
||||||
|
|
||||||
++env->dbg_Auto_AF_MultMsg_Idx;
|
++env->dbg_Auto_AF_MultMsg_Idx;
|
||||||
if (env->dbg_Auto_AF_MultMsg_Idx > 3) {
|
if (env->dbg_Auto_AF_MultMsg_Idx > 3) {
|
||||||
env->dbg_Auto_AF_MultMsg_Idx = 0;
|
env->dbg_Auto_AF_MultMsg_Idx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ccu_candb_dbg_tx.dbg_Auto_AF.dbg_Auto_AF_MultMsg_Idx = env->dbg_Auto_AF_MultMsg_Idx;
|
||||||
|
|
||||||
|
env->can_id = Pack_dbg_Auto_AF_candb_dbg2(&ccu_candb_dbg_tx.dbg_Auto_AF, env->canFrame.data,
|
||||||
|
&env->canFrame.dlc, &env->ide);
|
||||||
|
|
||||||
return event_dbg_Auto_AF_CYC;
|
return event_dbg_Auto_AF_CYC;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -108,15 +107,16 @@ static eTimeEventDbgTransmit isEventTransmitter(tCanSpamDebugTransmitter *env) {
|
||||||
if (env->time_dbg_Auto_Duct_CYC <= env->timeMs) {
|
if (env->time_dbg_Auto_Duct_CYC <= env->timeMs) {
|
||||||
env->time_dbg_Auto_Duct_CYC = env->timeMs + dbg_Auto_Duct_CYC;
|
env->time_dbg_Auto_Duct_CYC = env->timeMs + dbg_Auto_Duct_CYC;
|
||||||
|
|
||||||
|
++env->dbg_Auto_Duct_MultMsg_Idx;
|
||||||
|
if (env->dbg_Auto_Duct_MultMsg_Idx > 6) {
|
||||||
|
env->dbg_Auto_Duct_MultMsg_Idx = 0;
|
||||||
|
}
|
||||||
|
|
||||||
ccu_candb_dbg_tx.dbg_Auto_Duct.dbg_Auto_Duct_MultMsg_Idx = env->dbg_Auto_Duct_MultMsg_Idx;
|
ccu_candb_dbg_tx.dbg_Auto_Duct.dbg_Auto_Duct_MultMsg_Idx = env->dbg_Auto_Duct_MultMsg_Idx;
|
||||||
|
|
||||||
env->can_id = Pack_dbg_Auto_Duct_candb_dbg2(&ccu_candb_dbg_tx.dbg_Auto_Duct, env->canFrame.data,
|
env->can_id = Pack_dbg_Auto_Duct_candb_dbg2(&ccu_candb_dbg_tx.dbg_Auto_Duct, env->canFrame.data,
|
||||||
&env->canFrame.dlc, &env->ide);
|
&env->canFrame.dlc, &env->ide);
|
||||||
|
|
||||||
++env->dbg_Auto_Duct_MultMsg_Idx;
|
|
||||||
if (env->dbg_Auto_Duct_MultMsg_Idx > 5) {
|
|
||||||
env->dbg_Auto_Duct_MultMsg_Idx = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return event_dbg_Auto_Duct_CYC;
|
return event_dbg_Auto_Duct_CYC;
|
||||||
}
|
}
|
||||||
|
|
@ -152,7 +152,7 @@ static eTimeEventDbgTransmit isEventTransmitter(tCanSpamDebugTransmitter *env) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (dbg_CCU_IO_SEND == 1)
|
#if (dbg_CCU_IO_SEND == 1)
|
||||||
if (env->time_dbg_CCU_IO_CYC <= env->timeMs) {
|
if (env->time_dbg_CCU_IO_CYC < env->timeMs) {
|
||||||
env->time_dbg_CCU_IO_CYC = env->timeMs + dbg_CCU_IO_CYC;
|
env->time_dbg_CCU_IO_CYC = env->timeMs + dbg_CCU_IO_CYC;
|
||||||
|
|
||||||
env->can_id = Pack_dbg_CCU_IO_candb_dbg(&ccu_candb_dbg_tx.dbg_CCU_IO, env->canFrame.data,
|
env->can_id = Pack_dbg_CCU_IO_candb_dbg(&ccu_candb_dbg_tx.dbg_CCU_IO, env->canFrame.data,
|
||||||
|
|
@ -358,7 +358,7 @@ static eTimeEventDbgTransmit isEventTransmitter(tCanSpamDebugTransmitter *env) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (dbg_Sen_Demist_SEND == 1)
|
#if (dbg_Sen_Demist_SEND == 1)
|
||||||
if (env->time_dbg_Sen_Demist_CYC <= env->timeMs) {
|
if (env->time_dbg_Sen_Demist_CYC < env->timeMs) {
|
||||||
env->time_dbg_Sen_Demist_CYC = env->timeMs + dbg_Sen_Demist_CYC;
|
env->time_dbg_Sen_Demist_CYC = env->timeMs + dbg_Sen_Demist_CYC;
|
||||||
|
|
||||||
env->can_id = Pack_dbg_Sen_Demist_candb_dbg(&ccu_candb_dbg_tx.dbg_Sen_Demist, env->canFrame.data,
|
env->can_id = Pack_dbg_Sen_Demist_candb_dbg(&ccu_candb_dbg_tx.dbg_Sen_Demist, env->canFrame.data,
|
||||||
|
|
@ -369,7 +369,7 @@ static eTimeEventDbgTransmit isEventTransmitter(tCanSpamDebugTransmitter *env) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (dbg_Sen_Duct_SEND == 1)
|
#if (dbg_Sen_Duct_SEND == 1)
|
||||||
if (env->time_dbg_Sen_Duct_CYC <= env->timeMs) {
|
if (env->time_dbg_Sen_Duct_CYC < env->timeMs) {
|
||||||
env->time_dbg_Sen_Duct_CYC = env->timeMs + dbg_Sen_Duct_CYC;
|
env->time_dbg_Sen_Duct_CYC = env->timeMs + dbg_Sen_Duct_CYC;
|
||||||
|
|
||||||
if (env->dbg_Sen_Duct_MultMsg_Idx >= 3) {
|
if (env->dbg_Sen_Duct_MultMsg_Idx >= 3) {
|
||||||
|
|
@ -421,29 +421,6 @@ static eTimeEventDbgTransmit isEventTransmitter(tCanSpamDebugTransmitter *env) {
|
||||||
return event_dbg_none;
|
return event_dbg_none;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_CanDebugSpamTransmitter(tCanSpamDebugTransmitter *env) {
|
|
||||||
if (osMutexAcquire(env->access, 5000) == osOK) {
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Act0, &rtY.dbgCAN_dbg_Act0_model, sizeof(ccu_candb_dbg_tx.dbg_Act0));
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Act1, &rtY.dbgCAN_dbg_Act1_model, sizeof(ccu_candb_dbg_tx.dbg_Act1));
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Act2, &rtY.dbgCAN_dbg_Act2_model, sizeof(ccu_candb_dbg_tx.dbg_Act2));
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Sen_Duct, &rtY.dbgCAN_dbg_Sen_Duct_model, sizeof(ccu_candb_dbg_tx.dbg_Sen_Duct));
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Sen_Eva, &rtY.dbgCAN_dbg_Sen_Eva_model, sizeof(ccu_candb_dbg_tx.dbg_Sen_Eva));
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Logic_Blower, &rtY.dbgCAN_dbg_Logic_Blower_model,sizeof(ccu_candb_dbg_tx.dbg_Logic_Blower));
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Sen_Amb, &rtY.dbgCAN_dbg_Sen_Amb_model, sizeof(ccu_candb_dbg_tx.dbg_Sen_Amb));
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Sen_Incar, &rtY.dbgCAN_dbg_Sen_Incar_model,sizeof(ccu_candb_dbg_tx.dbg_Sen_Incar));
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Sen_0, &rtY.dbgCAN_dbg_Sen_0_model, sizeof(ccu_candb_dbg_tx.dbg_Sen_0));
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Logic_Ac, &rtY.dbg_Logic_Ac_model, sizeof(ccu_candb_dbg_tx.dbg_Logic_Ac));
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_CCU_IO, &rtY.dbgCAN_CCU_IO_model, sizeof(ccu_candb_dbg_tx.dbg_CCU_IO));
|
|
||||||
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Logic_Rec, &rtY.dbgCAN_Logic_Rec_model, sizeof(ccu_candb_dbg_tx.dbg_Logic_Rec));
|
|
||||||
memcpy(&ccu_candb_dbg_tx.dbg_Logic_State, &rtY.dbgCAN_Logic_State_model, sizeof(ccu_candb_dbg_tx.dbg_Logic_State));
|
|
||||||
|
|
||||||
osMutexRelease(env->access);
|
|
||||||
} else {
|
|
||||||
LoggerErrorStatic(LOGGER, LOG_SIGN, "Access error set_CanDebugSpamTransmitter");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_DBG_CCU_Mute(tCanSpamDebugTransmitter *env, bool mute) {
|
void set_DBG_CCU_Mute(tCanSpamDebugTransmitter *env, bool mute) {
|
||||||
if (osMutexAcquire(env->access, 5000) == osOK) {
|
if (osMutexAcquire(env->access, 5000) == osOK) {
|
||||||
env->isMute = mute;
|
env->isMute = mute;
|
||||||
|
|
@ -453,10 +430,23 @@ void set_DBG_CCU_Mute(tCanSpamDebugTransmitter *env, bool mute) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_CanDebugSpamTransmitter(tCanSpamDebugTransmitter *env, ccu_candb_dbg_tx_t *p_ccu_candb_dbg_tx_t ) {
|
||||||
|
|
||||||
|
uint32_t countQueue_ccu_candb_dbg_tx = osMessageQueueGetSpace(env->queue_ccu_candb_dbg_tx);
|
||||||
|
|
||||||
|
if (countQueue_ccu_candb_dbg_tx) {
|
||||||
|
osStatus_t status = osMessageQueuePut(env->queue_ccu_candb_dbg_tx, p_ccu_candb_dbg_tx_t, 0, 0U);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static _Noreturn void CanSpamDebugTransmitter_Thread(tCanSpamDebugTransmitter *env) {
|
static _Noreturn void CanSpamDebugTransmitter_Thread(tCanSpamDebugTransmitter *env) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
SystemDelayMs(50);
|
SystemDelayMs(50);
|
||||||
|
|
||||||
|
osStatus_t status = osMessageQueueGet(env->queue_ccu_candb_dbg_tx, &ccu_candb_dbg_tx, 0, 0);
|
||||||
|
|
||||||
if (env->isMute == false) {
|
if (env->isMute == false) {
|
||||||
|
|
||||||
if (osMutexAcquire(env->access, 5000) == osOK) {
|
if (osMutexAcquire(env->access, 5000) == osOK) {
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,11 @@
|
||||||
#include "LoggerInterface.h"
|
#include "LoggerInterface.h"
|
||||||
#include "CanSpamDebugReceiver.h"
|
#include "CanSpamDebugReceiver.h"
|
||||||
|
|
||||||
#define SPAM_DEBUG_CAN_HANDLER 0
|
|
||||||
|
|
||||||
#define dbg_Act0_SEND 1
|
#define dbg_Act0_SEND 1
|
||||||
#define dbg_Act1_SEND 1
|
#define dbg_Act1_SEND 1
|
||||||
#define dbg_Act2_SEND 1
|
#define dbg_Act2_SEND 1
|
||||||
#define dbg_Auto_AF_SEND 0
|
#define dbg_Auto_AF_SEND 1
|
||||||
#define dbg_Auto_Duct_SEND 0
|
#define dbg_Auto_Duct_SEND 1
|
||||||
#define dbg_Auto_Valve_Plus_SEND 0
|
#define dbg_Auto_Valve_Plus_SEND 0
|
||||||
#define dbg_CCU_Info_SEND 0
|
#define dbg_CCU_Info_SEND 0
|
||||||
#define dbg_CCU_IO_SEND 1
|
#define dbg_CCU_IO_SEND 1
|
||||||
|
|
@ -43,15 +41,16 @@
|
||||||
#define dbg_Sen_Eva_SEND 1
|
#define dbg_Sen_Eva_SEND 1
|
||||||
#define dbg_Sen_Incar_SEND 1
|
#define dbg_Sen_Incar_SEND 1
|
||||||
|
|
||||||
|
|
||||||
#define dbg_Act0_CYC 100
|
#define dbg_Act0_CYC 100
|
||||||
#define dbg_Act1_CYC 100
|
#define dbg_Act1_CYC 100
|
||||||
#define dbg_Act2_CYC 100
|
#define dbg_Act2_CYC 100
|
||||||
#define dbg_Auto_AF_CYC_ 100
|
#define dbg_Auto_AF_CYC__ 100
|
||||||
#define dbg_Auto_Duct_CYC_ 100
|
#define dbg_Auto_Duct_CYC__ 100
|
||||||
#define dbg_Auto_Valve_Plus_CYC 100
|
#define dbg_Auto_Valve_Plus_CYC 100
|
||||||
#define dbg_CCU_Info_CYC_ 100
|
#define dbg_CCU_Info_CYC__ 100
|
||||||
#define dbg_CCU_IO_CYC 100
|
#define dbg_CCU_IO_CYC 100
|
||||||
#define dbg_DiffBlr_ValveOpen_CYC_ 100
|
#define dbg_DiffBlr_ValveOpen_CYC__ 100
|
||||||
#define dbg_Drs_CYC 100
|
#define dbg_Drs_CYC 100
|
||||||
#define dbg_Info_Act1_CYC 100
|
#define dbg_Info_Act1_CYC 100
|
||||||
#define dbg_Info_Act2_CYC 100
|
#define dbg_Info_Act2_CYC 100
|
||||||
|
|
@ -66,12 +65,12 @@
|
||||||
#define dbg_Logic_Rec_CYC 100
|
#define dbg_Logic_Rec_CYC 100
|
||||||
#define dbg_Logic_State_CYC 100
|
#define dbg_Logic_State_CYC 100
|
||||||
#define dbg_Logic_Valve_CYC 100
|
#define dbg_Logic_Valve_CYC 100
|
||||||
#define dbg_Sen_0_CYC_ 100
|
#define dbg_Sen_0_CYC__ 100
|
||||||
#define dbg_Sen_Amb_CYC 100
|
#define dbg_Sen_Amb_CYC 100
|
||||||
#define dbg_Sen_Demist_CYC 100
|
#define dbg_Sen_Demist_CYC 100
|
||||||
#define dbg_Sen_Duct_CYC_ 100
|
#define dbg_Sen_Duct_CYC__ 100
|
||||||
#define dbg_Sen_Eva_CYC 100
|
#define dbg_Sen_Eva_CYC 100
|
||||||
#define dbg_Sen_Incar_CYC_ 100
|
#define dbg_Sen_Incar_CYC__ 100
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
event_dbg_none = 0x00,
|
event_dbg_none = 0x00,
|
||||||
|
|
@ -112,11 +111,12 @@ typedef struct {
|
||||||
tSerialPortFrameIO *ioCanFrame;
|
tSerialPortFrameIO *ioCanFrame;
|
||||||
osMutexId_t access;
|
osMutexId_t access;
|
||||||
can_rx_message_type canFrame;
|
can_rx_message_type canFrame;
|
||||||
osMutexId_t modelTaskAccess;
|
|
||||||
bool isMute;
|
bool isMute;
|
||||||
|
|
||||||
tCanSpamDebugReceiver *canSpamDebugReceiver;
|
tCanSpamDebugReceiver *canSpamDebugReceiver;
|
||||||
|
|
||||||
|
osMessageQueueId_t queue_ccu_candb_dbg_tx;
|
||||||
|
|
||||||
uint32_t can_id;
|
uint32_t can_id;
|
||||||
uint32_t timeMs;
|
uint32_t timeMs;
|
||||||
uint8_t ide;
|
uint8_t ide;
|
||||||
|
|
@ -161,7 +161,6 @@ typedef struct {
|
||||||
uint8_t dbg_Auto_Duct_MultMsg_Idx;
|
uint8_t dbg_Auto_Duct_MultMsg_Idx;
|
||||||
uint8_t dbg_Auto_AF_MultMsg_Idx;
|
uint8_t dbg_Auto_AF_MultMsg_Idx;
|
||||||
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
osThreadId_t id;
|
osThreadId_t id;
|
||||||
uint32_t stack[384];
|
uint32_t stack[384];
|
||||||
|
|
@ -173,12 +172,11 @@ typedef struct {
|
||||||
|
|
||||||
void
|
void
|
||||||
CanSpamDebugTransmitter_Init(tCanSpamDebugTransmitter *env, tSerialPortFrameIO *ioCanFrame,
|
CanSpamDebugTransmitter_Init(tCanSpamDebugTransmitter *env, tSerialPortFrameIO *ioCanFrame,
|
||||||
tCanSpamDebugReceiver *canSpamDebugReceiver, osMutexId_t modelTaskAccess, tLoggerInterface *logger);
|
tCanSpamDebugReceiver *canSpamDebugReceiver, tLoggerInterface *logger);
|
||||||
|
|
||||||
void CanSpamDebugTransmitter_StartThread(tCanSpamDebugTransmitter *env);
|
void CanSpamDebugTransmitter_StartThread(tCanSpamDebugTransmitter *env);
|
||||||
|
|
||||||
void set_CanDebugSpamTransmitter(tCanSpamDebugTransmitter *env);
|
void set_CanDebugSpamTransmitter(tCanSpamDebugTransmitter *env, ccu_candb_dbg_tx_t *p_ccu_candb_dbg_tx_t );
|
||||||
|
|
||||||
void set_DBG_CCU_Mute(tCanSpamDebugTransmitter *env, bool mute);
|
void set_DBG_CCU_Mute(tCanSpamDebugTransmitter *env, bool mute);
|
||||||
|
|
||||||
#endif //HVAC_M7_CANSPAMDEBUGTRANSMITTER_H
|
#endif //HVAC_M7_CANSPAMDEBUGTRANSMITTER_H
|
||||||
|
|
@ -338,10 +338,21 @@ uint32_t Pack_dbg_Auto_Duct_candb_dbg2(dbg_Auto_Duct_t *_m, uint8_t *_d, uint8_t
|
||||||
for (i = 0u; i < CANDB_DBG_VALIDATE_DLC(dbg_Auto_Duct_DLC);
|
for (i = 0u; i < CANDB_DBG_VALIDATE_DLC(dbg_Auto_Duct_DLC);
|
||||||
_d[i++] = CANDB_DBG_INITIAL_BYTE_VALUE);
|
_d[i++] = CANDB_DBG_INITIAL_BYTE_VALUE);
|
||||||
|
|
||||||
_d[0] |= (uint8_t) (_m->dbg_Auto_Duct_MultMsg_Idx & 0x0F);
|
|
||||||
|
dbg_Auto_Duct_Frame0_t *dbg_Auto_Duct_Frame0 = (dbg_Auto_Duct_Frame0_t *) _d;
|
||||||
|
dbg_Auto_Duct_Multi_6_Frame0_t *dbg_Auto_Duct_Multi_6_Frame0 = (dbg_Auto_Duct_Multi_6_Frame0_t *) _d;
|
||||||
|
|
||||||
|
// _d[0] |= (uint8_t) (_m->dbg_Auto_Duct_MultMsg_Idx & 0x0F);
|
||||||
|
|
||||||
switch (_m->dbg_Auto_Duct_MultMsg_Idx) {
|
switch (_m->dbg_Auto_Duct_MultMsg_Idx) {
|
||||||
case 0: // Кадр 0: FL верхние параметры
|
case 0: // Кадр 0: FL верхние параметры
|
||||||
|
dbg_Auto_Duct_Frame0->dbg_Auto_Duct_MultMsg_Idx = _m->dbg_Auto_Duct_MultMsg_Idx;
|
||||||
|
dbg_Auto_Duct_Frame0->value1 = _m->dbg_Auto_Duct_Tgt_FL_Upper_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value2 = _m->dbg_Auto_Duct_Tg_FL_Upper_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value3 = _m->dbg_Auto_Duct_Incar_FL_Upper_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value4 = _m->dbg_Auto_Duct_Amb_FL_Upper_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value5 = _m->dbg_Auto_Duct_Sun_FL_Upper_ro;
|
||||||
|
/*
|
||||||
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FL_Upper_ro & 0x0F) << 4);
|
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FL_Upper_ro & 0x0F) << 4);
|
||||||
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FL_Upper_ro >> 4) & 0xFF);
|
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FL_Upper_ro >> 4) & 0xFF);
|
||||||
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_FL_Upper_ro & 0xFF);
|
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_FL_Upper_ro & 0xFF);
|
||||||
|
|
@ -352,9 +363,17 @@ uint32_t Pack_dbg_Auto_Duct_candb_dbg2(dbg_Auto_Duct_t *_m, uint8_t *_d, uint8_t
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_FL_Upper_ro >> 8) & 0x0F);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_FL_Upper_ro >> 8) & 0x0F);
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FL_Upper_ro & 0x0F) << 4);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FL_Upper_ro & 0x0F) << 4);
|
||||||
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FL_Upper_ro >> 4) & 0xFF);
|
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FL_Upper_ro >> 4) & 0xFF);
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // Кадр 1: FR верхние параметры
|
case 1: // Кадр 1: FR верхние параметры
|
||||||
|
dbg_Auto_Duct_Frame0->dbg_Auto_Duct_MultMsg_Idx = _m->dbg_Auto_Duct_MultMsg_Idx;
|
||||||
|
dbg_Auto_Duct_Frame0->value1 = _m->dbg_Auto_Duct_Tgt_FR_Upper_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value2 = _m->dbg_Auto_Duct_Tg_FR_Upper_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value3 = _m->dbg_Auto_Duct_Incar_FR_Upper_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value4 = _m->dbg_Auto_Duct_Amb_FR_Upper_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value5 = _m->dbg_Auto_Duct_Sun_FR_Upper_ro;
|
||||||
|
/*
|
||||||
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FR_Upper_ro & 0x0F) << 4);
|
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FR_Upper_ro & 0x0F) << 4);
|
||||||
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FR_Upper_ro >> 4) & 0xFF);
|
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FR_Upper_ro >> 4) & 0xFF);
|
||||||
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_FR_Upper_ro & 0xFF);
|
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_FR_Upper_ro & 0xFF);
|
||||||
|
|
@ -365,9 +384,17 @@ uint32_t Pack_dbg_Auto_Duct_candb_dbg2(dbg_Auto_Duct_t *_m, uint8_t *_d, uint8_t
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_FR_Upper_ro >> 8) & 0x0F);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_FR_Upper_ro >> 8) & 0x0F);
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FR_Upper_ro & 0x0F) << 4);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FR_Upper_ro & 0x0F) << 4);
|
||||||
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FR_Upper_ro >> 4) & 0xFF);
|
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FR_Upper_ro >> 4) & 0xFF);
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // Кадр 2: FL нижние параметры
|
case 2: // Кадр 2: FL нижние параметры
|
||||||
|
dbg_Auto_Duct_Frame0->dbg_Auto_Duct_MultMsg_Idx = _m->dbg_Auto_Duct_MultMsg_Idx;
|
||||||
|
dbg_Auto_Duct_Frame0->value1 = _m->dbg_Auto_Duct_Tgt_FL_Lower_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value2 = _m->dbg_Auto_Duct_Tg_FL_Lower_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value3 = _m->dbg_Auto_Duct_Incar_FL_Lower_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value4 = _m->dbg_Auto_Duct_Amb_FL_Lower_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value5 = _m->dbg_Auto_Duct_Sun_FL_Lower_ro;
|
||||||
|
/*
|
||||||
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FL_Lower_ro & 0x0F) << 4);
|
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FL_Lower_ro & 0x0F) << 4);
|
||||||
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FL_Lower_ro >> 4) & 0xFF);
|
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FL_Lower_ro >> 4) & 0xFF);
|
||||||
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_FL_Lower_ro & 0xFF);
|
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_FL_Lower_ro & 0xFF);
|
||||||
|
|
@ -378,9 +405,17 @@ uint32_t Pack_dbg_Auto_Duct_candb_dbg2(dbg_Auto_Duct_t *_m, uint8_t *_d, uint8_t
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_FL_Lower_ro >> 8) & 0x0F);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_FL_Lower_ro >> 8) & 0x0F);
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FL_Lower_ro & 0x0F) << 4);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FL_Lower_ro & 0x0F) << 4);
|
||||||
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FL_Lower_ro >> 4) & 0xFF);
|
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FL_Lower_ro >> 4) & 0xFF);
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: // Кадр 3: FR нижние параметры
|
case 3: // Кадр 3: FR нижние параметры
|
||||||
|
dbg_Auto_Duct_Frame0->dbg_Auto_Duct_MultMsg_Idx = _m->dbg_Auto_Duct_MultMsg_Idx;
|
||||||
|
dbg_Auto_Duct_Frame0->value1 = _m->dbg_Auto_Duct_Tgt_FR_Lower_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value2 = _m->dbg_Auto_Duct_Tg_FR_Lower_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value3 = _m->dbg_Auto_Duct_Incar_FR_Lower_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value4 = _m->dbg_Auto_Duct_Amb_FR_Lower_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value5 = _m->dbg_Auto_Duct_Sun_FR_Lower_ro;
|
||||||
|
/*
|
||||||
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FR_Lower_ro & 0x0F) << 4);
|
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FR_Lower_ro & 0x0F) << 4);
|
||||||
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FR_Lower_ro >> 4) & 0xFF);
|
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_FR_Lower_ro >> 4) & 0xFF);
|
||||||
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_FR_Lower_ro & 0xFF);
|
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_FR_Lower_ro & 0xFF);
|
||||||
|
|
@ -391,9 +426,18 @@ uint32_t Pack_dbg_Auto_Duct_candb_dbg2(dbg_Auto_Duct_t *_m, uint8_t *_d, uint8_t
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_FR_Lower_ro >> 8) & 0x0F);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_FR_Lower_ro >> 8) & 0x0F);
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FR_Lower_ro & 0x0F) << 4);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FR_Lower_ro & 0x0F) << 4);
|
||||||
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FR_Lower_ro >> 4) & 0xFF);
|
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_FR_Lower_ro >> 4) & 0xFF);
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4: // Кадр 4: RL параметры
|
case 4: // Кадр 4: RL параметры
|
||||||
|
dbg_Auto_Duct_Frame0->dbg_Auto_Duct_MultMsg_Idx = _m->dbg_Auto_Duct_MultMsg_Idx;
|
||||||
|
dbg_Auto_Duct_Frame0->value1 = _m->dbg_Auto_Duct_Tgt_RL_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value2 = _m->dbg_Auto_Duct_Tg_RL_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value3 = _m->dbg_Auto_Duct_Incar_RL_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value4 = _m->dbg_Auto_Duct_Amb_RL_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value5 = _m->dbg_Auto_Duct_Sun_RL_ro;
|
||||||
|
|
||||||
|
/*
|
||||||
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_RL_ro & 0x0F) << 4);
|
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_RL_ro & 0x0F) << 4);
|
||||||
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_RL_ro >> 4) & 0xFF);
|
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_RL_ro >> 4) & 0xFF);
|
||||||
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_RL_ro & 0xFF);
|
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_RL_ro & 0xFF);
|
||||||
|
|
@ -404,9 +448,17 @@ uint32_t Pack_dbg_Auto_Duct_candb_dbg2(dbg_Auto_Duct_t *_m, uint8_t *_d, uint8_t
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_RL_ro >> 8) & 0x0F);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_RL_ro >> 8) & 0x0F);
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_RL_ro & 0x0F) << 4);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_RL_ro & 0x0F) << 4);
|
||||||
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_RL_ro >> 4) & 0xFF);
|
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_RL_ro >> 4) & 0xFF);
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5: // Кадр 5: RR параметры
|
case 5: // Кадр 5: RR параметры
|
||||||
|
dbg_Auto_Duct_Frame0->dbg_Auto_Duct_MultMsg_Idx = _m->dbg_Auto_Duct_MultMsg_Idx;
|
||||||
|
dbg_Auto_Duct_Frame0->value1 = _m->dbg_Auto_Duct_Tgt_RR_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value2 = _m->dbg_Auto_Duct_Tg_RR_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value3 = _m->dbg_Auto_Duct_Incar_RR_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value4 = _m->dbg_Auto_Duct_Amb_RR_ro;
|
||||||
|
dbg_Auto_Duct_Frame0->value5 = _m->dbg_Auto_Duct_Sun_RR_ro;
|
||||||
|
/*
|
||||||
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_RR_ro & 0x0F) << 4);
|
_d[0] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_RR_ro & 0x0F) << 4);
|
||||||
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_RR_ro >> 4) & 0xFF);
|
_d[1] |= (uint8_t) ((_m->dbg_Auto_Duct_Tgt_RR_ro >> 4) & 0xFF);
|
||||||
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_RR_ro & 0xFF);
|
_d[2] |= (uint8_t) (_m->dbg_Auto_Duct_Tg_RR_ro & 0xFF);
|
||||||
|
|
@ -417,6 +469,19 @@ uint32_t Pack_dbg_Auto_Duct_candb_dbg2(dbg_Auto_Duct_t *_m, uint8_t *_d, uint8_t
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_RR_ro >> 8) & 0x0F);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Amb_RR_ro >> 8) & 0x0F);
|
||||||
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_RR_ro & 0x0F) << 4);
|
_d[6] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_RR_ro & 0x0F) << 4);
|
||||||
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_RR_ro >> 4) & 0xFF);
|
_d[7] |= (uint8_t) ((_m->dbg_Auto_Duct_Sun_RR_ro >> 4) & 0xFF);
|
||||||
|
*/
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case 6: // Кадр 6:
|
||||||
|
dbg_Auto_Duct_Frame0->dbg_Auto_Duct_MultMsg_Idx = _m->dbg_Auto_Duct_MultMsg_Idx;
|
||||||
|
dbg_Auto_Duct_Multi_6_Frame0->value1 = _m->dbg_Auto_Duct_Tg_Incar_FL_Upper_ro;
|
||||||
|
dbg_Auto_Duct_Multi_6_Frame0->value2 = _m->dbg_Auto_Duct_Tg_Incar_FR_Upper_ro;
|
||||||
|
dbg_Auto_Duct_Multi_6_Frame0->value3 = _m->dbg_Auto_Duct_Tg_Incar_FL_Lower_ro;
|
||||||
|
dbg_Auto_Duct_Multi_6_Frame0->value4 = _m->dbg_Auto_Duct_Tg_Incar_FR_Lower_ro;
|
||||||
|
dbg_Auto_Duct_Multi_6_Frame0->value5 = _m->dbg_Auto_Duct_Tg_Incar_RL_ro;
|
||||||
|
dbg_Auto_Duct_Multi_6_Frame0->value6 = _m->dbg_Auto_Duct_Tg_Incar_RR_ro;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -434,10 +499,20 @@ uint32_t Pack_dbg_Auto_AF_candb_dbg2(dbg_Auto_AF_t *_m, uint8_t *_d, uint8_t *_l
|
||||||
for (i = 0u; i < CANDB_DBG_VALIDATE_DLC(dbg_Auto_AF_DLC);
|
for (i = 0u; i < CANDB_DBG_VALIDATE_DLC(dbg_Auto_AF_DLC);
|
||||||
_d[i++] = CANDB_DBG_INITIAL_BYTE_VALUE);
|
_d[i++] = CANDB_DBG_INITIAL_BYTE_VALUE);
|
||||||
|
|
||||||
_d[0] |= (uint8_t) (_m->dbg_Auto_AF_MultMsg_Idx & 0x03);
|
|
||||||
|
dbg_Auto_AF_Frame0_t *dbg_Auto_AF_Frame0 = (dbg_Auto_AF_Frame0_t *) _d;
|
||||||
|
|
||||||
|
// _d[0] |= (uint8_t)(_m->dbg_Auto_AF_MultMsg_Idx & 0x03);
|
||||||
|
|
||||||
switch (_m->dbg_Auto_AF_MultMsg_Idx) {
|
switch (_m->dbg_Auto_AF_MultMsg_Idx) {
|
||||||
case 0: // Кадр 0: FL коррекция
|
case 0: // Кадр 0: FL коррекция
|
||||||
|
dbg_Auto_AF_Frame0->dbg_Auto_AF_MultMsg_Idx = _m->dbg_Auto_AF_MultMsg_Idx;
|
||||||
|
dbg_Auto_AF_Frame0->value1 = _m->dbg_Auto_AF_Correct_FL;
|
||||||
|
dbg_Auto_AF_Frame0->value2 = _m->dbg_Auto_AF_Vtg_FL;
|
||||||
|
dbg_Auto_AF_Frame0->value3 = _m->dbg_Auto_AF_Incar_FL;
|
||||||
|
dbg_Auto_AF_Frame0->value4 = _m->dbg_Auto_AF_Amb_FL;
|
||||||
|
dbg_Auto_AF_Frame0->value5 = _m->dbg_Auto_AF_Sun_FL;
|
||||||
|
/*
|
||||||
_d[0] |= (uint8_t)((_m->dbg_Auto_AF_Correct_FL & 0x0F) << 4);
|
_d[0] |= (uint8_t)((_m->dbg_Auto_AF_Correct_FL & 0x0F) << 4);
|
||||||
_d[1] |= (uint8_t)((_m->dbg_Auto_AF_Correct_FL >> 4) & 0xFF);
|
_d[1] |= (uint8_t)((_m->dbg_Auto_AF_Correct_FL >> 4) & 0xFF);
|
||||||
_d[2] |= (uint8_t)(_m->dbg_Auto_AF_Vtg_FL & 0xFF);
|
_d[2] |= (uint8_t)(_m->dbg_Auto_AF_Vtg_FL & 0xFF);
|
||||||
|
|
@ -448,9 +523,17 @@ uint32_t Pack_dbg_Auto_AF_candb_dbg2(dbg_Auto_AF_t *_m, uint8_t *_d, uint8_t *_l
|
||||||
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Amb_FL >> 8) & 0x0F);
|
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Amb_FL >> 8) & 0x0F);
|
||||||
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Sun_FL & 0x0F) << 4);
|
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Sun_FL & 0x0F) << 4);
|
||||||
_d[7] |= (uint8_t)((_m->dbg_Auto_AF_Sun_FL >> 4) & 0xFF);
|
_d[7] |= (uint8_t)((_m->dbg_Auto_AF_Sun_FL >> 4) & 0xFF);
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // Кадр 1: FR коррекция
|
case 1: // Кадр 1: FR коррекция
|
||||||
|
dbg_Auto_AF_Frame0->dbg_Auto_AF_MultMsg_Idx = _m->dbg_Auto_AF_MultMsg_Idx;
|
||||||
|
dbg_Auto_AF_Frame0->value1 = _m->dbg_Auto_AF_Correct_FR;
|
||||||
|
dbg_Auto_AF_Frame0->value2 = _m->dbg_Auto_AF_Vtg_FR;
|
||||||
|
dbg_Auto_AF_Frame0->value3 = _m->dbg_Auto_AF_Incar_FR;
|
||||||
|
dbg_Auto_AF_Frame0->value4 = _m->dbg_Auto_AF_Amb_FR;
|
||||||
|
dbg_Auto_AF_Frame0->value5 = _m->dbg_Auto_AF_Sun_FR;
|
||||||
|
/*
|
||||||
_d[0] |= (uint8_t)((_m->dbg_Auto_AF_Correct_FR & 0x0F) << 4);
|
_d[0] |= (uint8_t)((_m->dbg_Auto_AF_Correct_FR & 0x0F) << 4);
|
||||||
_d[1] |= (uint8_t)((_m->dbg_Auto_AF_Correct_FR >> 4) & 0xFF);
|
_d[1] |= (uint8_t)((_m->dbg_Auto_AF_Correct_FR >> 4) & 0xFF);
|
||||||
_d[2] |= (uint8_t)(_m->dbg_Auto_AF_Vtg_FR & 0xFF);
|
_d[2] |= (uint8_t)(_m->dbg_Auto_AF_Vtg_FR & 0xFF);
|
||||||
|
|
@ -461,9 +544,17 @@ uint32_t Pack_dbg_Auto_AF_candb_dbg2(dbg_Auto_AF_t *_m, uint8_t *_d, uint8_t *_l
|
||||||
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Amb_FR >> 8) & 0x0F);
|
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Amb_FR >> 8) & 0x0F);
|
||||||
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Sun_FR & 0x0F) << 4);
|
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Sun_FR & 0x0F) << 4);
|
||||||
_d[7] |= (uint8_t)((_m->dbg_Auto_AF_Sun_FR >> 4) & 0xFF);
|
_d[7] |= (uint8_t)((_m->dbg_Auto_AF_Sun_FR >> 4) & 0xFF);
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // Кадр 2: RL коррекция
|
case 2: // Кадр 2: RL коррекция
|
||||||
|
dbg_Auto_AF_Frame0->dbg_Auto_AF_MultMsg_Idx = _m->dbg_Auto_AF_MultMsg_Idx;
|
||||||
|
dbg_Auto_AF_Frame0->value1 = _m->dbg_Auto_AF_Correct_RL;
|
||||||
|
dbg_Auto_AF_Frame0->value2 = _m->dbg_Auto_AF_Vtg_RL;
|
||||||
|
dbg_Auto_AF_Frame0->value3 = _m->dbg_Auto_AF_Incar_RL;
|
||||||
|
dbg_Auto_AF_Frame0->value4 = _m->dbg_Auto_AF_Amb_RL;
|
||||||
|
dbg_Auto_AF_Frame0->value5 = _m->dbg_Auto_AF_Sun_RL;
|
||||||
|
/*
|
||||||
_d[0] |= (uint8_t)((_m->dbg_Auto_AF_Correct_RL & 0x0F) << 4);
|
_d[0] |= (uint8_t)((_m->dbg_Auto_AF_Correct_RL & 0x0F) << 4);
|
||||||
_d[1] |= (uint8_t)((_m->dbg_Auto_AF_Correct_RL >> 4) & 0xFF);
|
_d[1] |= (uint8_t)((_m->dbg_Auto_AF_Correct_RL >> 4) & 0xFF);
|
||||||
_d[2] |= (uint8_t)(_m->dbg_Auto_AF_Vtg_RL & 0xFF);
|
_d[2] |= (uint8_t)(_m->dbg_Auto_AF_Vtg_RL & 0xFF);
|
||||||
|
|
@ -474,9 +565,17 @@ uint32_t Pack_dbg_Auto_AF_candb_dbg2(dbg_Auto_AF_t *_m, uint8_t *_d, uint8_t *_l
|
||||||
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Amb_RL >> 8) & 0x0F);
|
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Amb_RL >> 8) & 0x0F);
|
||||||
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Sun_RL & 0x0F) << 4);
|
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Sun_RL & 0x0F) << 4);
|
||||||
_d[7] |= (uint8_t)((_m->dbg_Auto_AF_Sun_RL >> 4) & 0xFF);
|
_d[7] |= (uint8_t)((_m->dbg_Auto_AF_Sun_RL >> 4) & 0xFF);
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: // Кадр 3: RR коррекция
|
case 3: // Кадр 3: RR коррекция
|
||||||
|
dbg_Auto_AF_Frame0->dbg_Auto_AF_MultMsg_Idx = _m->dbg_Auto_AF_MultMsg_Idx;
|
||||||
|
dbg_Auto_AF_Frame0->value1 = _m->dbg_Auto_AF_Correct_RR;
|
||||||
|
dbg_Auto_AF_Frame0->value2 = _m->dbg_Auto_AF_Vtg_RR;
|
||||||
|
dbg_Auto_AF_Frame0->value3 = _m->dbg_Auto_AF_Incar_RR;
|
||||||
|
dbg_Auto_AF_Frame0->value4 = _m->dbg_Auto_AF_Amb_RR;
|
||||||
|
dbg_Auto_AF_Frame0->value5 = _m->dbg_Auto_AF_Sun_RR;
|
||||||
|
/*
|
||||||
_d[0] |= (uint8_t)((_m->dbg_Auto_AF_Correct_RR & 0x0F) << 4);
|
_d[0] |= (uint8_t)((_m->dbg_Auto_AF_Correct_RR & 0x0F) << 4);
|
||||||
_d[1] |= (uint8_t)((_m->dbg_Auto_AF_Correct_RR >> 4) & 0xFF);
|
_d[1] |= (uint8_t)((_m->dbg_Auto_AF_Correct_RR >> 4) & 0xFF);
|
||||||
_d[2] |= (uint8_t)(_m->dbg_Auto_AF_Vtg_RR & 0xFF);
|
_d[2] |= (uint8_t)(_m->dbg_Auto_AF_Vtg_RR & 0xFF);
|
||||||
|
|
@ -487,6 +586,7 @@ uint32_t Pack_dbg_Auto_AF_candb_dbg2(dbg_Auto_AF_t *_m, uint8_t *_d, uint8_t *_l
|
||||||
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Amb_RR >> 8) & 0x0F);
|
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Amb_RR >> 8) & 0x0F);
|
||||||
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Sun_RR & 0x0F) << 4);
|
_d[6] |= (uint8_t)((_m->dbg_Auto_AF_Sun_RR & 0x0F) << 4);
|
||||||
_d[7] |= (uint8_t)((_m->dbg_Auto_AF_Sun_RR >> 4) & 0xFF);
|
_d[7] |= (uint8_t)((_m->dbg_Auto_AF_Sun_RR >> 4) & 0xFF);
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,35 @@ typedef struct {
|
||||||
uint32_t value4: 12; //40
|
uint32_t value4: 12; //40
|
||||||
} __attribute__((packed)) dbg_Sen_Incar_Frame0_t;
|
} __attribute__((packed)) dbg_Sen_Incar_Frame0_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t dbg_Auto_Duct_MultMsg_Idx: 4;
|
||||||
|
uint32_t value1: 12; //4
|
||||||
|
uint32_t value2: 12; //16
|
||||||
|
uint32_t value3: 12; //28
|
||||||
|
uint32_t value4: 12; //40
|
||||||
|
uint32_t value5: 12; //52
|
||||||
|
} __attribute__((packed)) dbg_Auto_Duct_Frame0_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t dbg_Auto_Duct_MultMsg_Idx: 4;
|
||||||
|
uint32_t value1: 10; //4
|
||||||
|
uint32_t value2: 10; //14
|
||||||
|
uint32_t value3: 10; //24
|
||||||
|
uint32_t value4: 10; //34
|
||||||
|
uint32_t value5: 10; //44
|
||||||
|
uint32_t value6: 10; //54
|
||||||
|
} __attribute__((packed)) dbg_Auto_Duct_Multi_6_Frame0_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t dbg_Auto_AF_MultMsg_Idx: 2;
|
||||||
|
uint32_t reserved0: 2;
|
||||||
|
uint32_t value1: 12; //4
|
||||||
|
uint32_t value2: 12; //16
|
||||||
|
uint32_t value3: 12; //28
|
||||||
|
uint32_t value4: 12; //40
|
||||||
|
uint32_t value5: 12; //52
|
||||||
|
} __attribute__((packed)) dbg_Auto_AF_Frame0_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Упаковка данных датчиков салона (исправленная версия)
|
* @brief Упаковка данных датчиков салона (исправленная версия)
|
||||||
* @param _m Указатель на структуру с данными
|
* @param _m Указатель на структуру с данными
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue