microRusEFI used as Body Control Module BCM BCU

This commit is contained in:
rusefi 2020-09-07 16:25:00 -04:00
parent f70c4b7a54
commit adbb3f07e7
3 changed files with 7 additions and 4 deletions

View File

@ -6,6 +6,6 @@ export PROJECT_BOARD=microrusefi
export PROJECT_CPU=ARCH_STM32F4 export PROJECT_CPU=ARCH_STM32F4
export EXTRA_PARAMS="-DSHORT_BOARD_NAME=mre_f4" export EXTRA_PARAMS="-DSHORT_BOARD_NAME=mre_f4"
# export DEBUG_LEVEL_OPT="-O0 -ggdb -g3"
bash config/boards/common_make.sh bash config/boards/common_make.sh

View File

@ -112,6 +112,9 @@ public:
msg[1] = OBD_CURRENT_DATA; msg[1] = OBD_CURRENT_DATA;
msg[2] = PID; msg[2] = PID;
} }
// let's sleep on write update after each OBD request, this would give read thread a chance to read response
// todo: smarter logic of all this with with semaphore not just sleep
chThdSleepMilliseconds(300);
return m_next; return m_next;
} }

View File

@ -48,9 +48,9 @@ void initCanSensors() {
if (CONFIG(consumeObdSensors)) { if (CONFIG(consumeObdSensors)) {
// registerCanSensor(canPedalSensor); // registerCanSensor(canPedalSensor);
registerCanSensor(obdRpmSensor); registerCanSensor(obdRpmSensor);
// registerCanSensor(obdCltSensor); registerCanSensor(obdCltSensor);
// registerCanSensor(obdIatSensor); registerCanSensor(obdIatSensor);
// registerCanSensor(obdTpsSensor); registerCanSensor(obdTpsSensor);
} }
} }
#endif // EFI_CAN_SUPPORT #endif // EFI_CAN_SUPPORT