add reset memory by can

This commit is contained in:
2023-08-29 16:28:12 +02:00
parent 72a307654f
commit debececcfd
2 changed files with 6 additions and 2 deletions

View File

@ -30,9 +30,12 @@ void CM_processIncome(uint8_t idSender, uint8_t idMsg, uint32_t data){
*********************/
case 0:
if(idMsg == 0x0) { // CONTROL_SETUP
// steeringMode - - controlAliveTime
// steeringMode eraseMemory - controlAliveTime
BYTES_4 tmpData;
tmpData.full.bytes = data;
if (tmpData.separate.byte1) {
MEM_reset();
}
CAR_CST.CONTROL_STEERING_MODE = tmpData.separate.byte0;
CAR_CST.CONTROL_ALIVE_TIME = tmpData.separate.byte3;
MEM_write_1_byte(MEMADD_CONTROL_STEERING_MODE, CAR_CST.CONTROL_STEERING_MODE);