This commit is contained in:
rusefi 2017-08-28 20:42:27 -04:00
parent c153e9a1dd
commit dbc0c8876a
3 changed files with 7 additions and 7 deletions

View File

@ -160,6 +160,7 @@ CSRC = $(STARTUPSRC) \
$(PLATFORMSRC) \ $(PLATFORMSRC) \
$(BOARDSRC) \ $(BOARDSRC) \
$(BOOTLOADERSRC) \ $(BOOTLOADERSRC) \
$(CHIBIOS)/os/various/devices_lib/accel/lis302dl.c \
$(CHIBIOS)/os/various/syscalls.c \ $(CHIBIOS)/os/various/syscalls.c \
$(CHIBIOS)/os/hal/lib/streams/memstreams.c \ $(CHIBIOS)/os/hal/lib/streams/memstreams.c \
$(CHIBIOS)/os/hal/lib/streams/chprintf.c \ $(CHIBIOS)/os/hal/lib/streams/chprintf.c \

View File

@ -55,11 +55,11 @@ void configureAccelerometerPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#if EFI_MEMS || defined(__DOXYGEN__) #if EFI_MEMS || defined(__DOXYGEN__)
void accelerometerPeriodicCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void accelerometerPeriodicCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// int8_t x = (int8_t)lis302dlReadRegister(driver, LIS302DL_OUTX); int8_t x = (int8_t)lis302dlReadRegister(driver, LIS302DL_OUTX);
// int8_t y = (int8_t)lis302dlReadRegister(driver, LIS302DL_OUTY); int8_t y = (int8_t)lis302dlReadRegister(driver, LIS302DL_OUTY);
} }
void initMems(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void initAccelerometer(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
if (engineConfiguration->LIS302DLCsPin == GPIOA_0) if (engineConfiguration->LIS302DLCsPin == GPIOA_0)
return; // temporary code to handle old configurations return; // temporary code to handle old configurations
if (engineConfiguration->LIS302DLCsPin == GPIO_UNASSIGNED) if (engineConfiguration->LIS302DLCsPin == GPIO_UNASSIGNED)
@ -88,10 +88,6 @@ void initMems(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
void initAccelerometer(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
}
float getLongitudinalAcceleration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { float getLongitudinalAcceleration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
return 0; return 0;
} }

View File

@ -22,6 +22,7 @@
#include "eficonsole.h" #include "eficonsole.h"
#include "max31855.h" #include "max31855.h"
#include "mpu_util.h" #include "mpu_util.h"
#include "accelerometer.h"
#if EFI_PROD_CODE #if EFI_PROD_CODE
//#include "usb_msd.h" //#include "usb_msd.h"
@ -412,6 +413,8 @@ void initHardware(Logging *l) {
initMmcCard(); initMmcCard();
#endif /* EFI_FILE_LOGGING */ #endif /* EFI_FILE_LOGGING */
initAccelerometer(PASS_ENGINE_PARAMETER_SIGNATURE);
// initFixedLeds(); // initFixedLeds();
// initBooleanInputs(); // initBooleanInputs();