diff --git a/flight/CopterControl/Makefile b/flight/CopterControl/Makefile index d5679a28d..1c84aad88 100644 --- a/flight/CopterControl/Makefile +++ b/flight/CopterControl/Makefile @@ -215,6 +215,7 @@ SRC += $(PIOSSTM32F10X)/pios_usb_hid_prop.c SRC += $(PIOSSTM32F10X)/pios_usb_hid_pwr.c ## PIOS Hardware (Common) +SRC += $(PIOSCOMMON)/pios_adxl345.c SRC += $(PIOSCOMMON)/pios_sdcard.c SRC += $(PIOSCOMMON)/pios_com.c SRC += $(PIOSCOMMON)/pios_i2c_esc.c diff --git a/flight/CopterControl/System/inc/pios_config.h b/flight/CopterControl/System/inc/pios_config.h index bdf5091c3..a3c0549bd 100644 --- a/flight/CopterControl/System/inc/pios_config.h +++ b/flight/CopterControl/System/inc/pios_config.h @@ -57,6 +57,8 @@ //#define PIOS_INCLUDE_WDG #define PIOS_INCLUDE_I2C_ESC +#define PIOS_INCLUDE_ADXL345 + /* Defaults for Logging */ #define LOG_FILENAME "PIOS.LOG" #define STARTUP_LOG_ENABLED 1 diff --git a/flight/CopterControl/System/pios_board.c b/flight/CopterControl/System/pios_board.c index 56d387edd..832208c1f 100644 --- a/flight/CopterControl/System/pios_board.c +++ b/flight/CopterControl/System/pios_board.c @@ -102,9 +102,9 @@ const struct pios_spi_cfg pios_spi_flash_accel_cfg = { .SPI_CRCPolynomial = 7, .SPI_CPOL = SPI_CPOL_High, .SPI_CPHA = SPI_CPHA_2Edge, - .SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_32, + .SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_256, }, - .use_crc = TRUE, + .use_crc = FALSE, .dma = { .ahb_clk = RCC_AHBPeriph_DMA1, diff --git a/flight/PiOS/pios.h b/flight/PiOS/pios.h index ab01ca5b6..cee4517a0 100644 --- a/flight/PiOS/pios.h +++ b/flight/PiOS/pios.h @@ -97,6 +97,10 @@ #endif #include +#if defined(PIOS_INCLUDE_ADXL345) +#include +#endif + #if defined(PIOS_INCLUDE_BL_HELPER) #include #endif diff --git a/flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj b/flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj index f25a92797..cd3c2c7ef 100644 --- a/flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj +++ b/flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj @@ -166,6 +166,8 @@ 65209A1912208B0600453371 /* gpsposition.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = gpsposition.xml; sourceTree = ""; }; 6526645A122DF972006F9A3C /* pios_i2c_priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_i2c_priv.h; sourceTree = ""; }; 6526645B122DF972006F9A3C /* pios_wdg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_wdg.h; sourceTree = ""; }; + 6528CCB412E406B800CF5144 /* pios_adxl345.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pios_adxl345.c; sourceTree = ""; }; + 6528CCE212E40F6700CF5144 /* pios_adxl345.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_adxl345.h; sourceTree = ""; }; 65322D3B122841F60046CD7C /* gpstime.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = gpstime.xml; sourceTree = ""; }; 65345C871288668B00A5E4E8 /* guidancesettings.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = guidancesettings.xml; sourceTree = ""; }; 65408AA812BB1648004DACC5 /* i2cstats.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = i2cstats.xml; sourceTree = ""; }; @@ -7471,6 +7473,7 @@ 65E8F03511EFF25C00BBF654 /* pios_opahrs_proto.c */, 65E8F03611EFF25C00BBF654 /* pios_sdcard.c */, 65E8F03711EFF25C00BBF654 /* printf-stdarg.c */, + 6528CCB412E406B800CF5144 /* pios_adxl345.c */, ); name = Common; path = ../../PiOS/Common; @@ -7480,6 +7483,7 @@ isa = PBXGroup; children = ( 6526645A122DF972006F9A3C /* pios_i2c_priv.h */, + 6528CCE212E40F6700CF5144 /* pios_adxl345.h */, 6526645B122DF972006F9A3C /* pios_wdg.h */, 651CF9EF120B700D00EEFD70 /* pios_usb_hid_desc.h */, 651CF9F0120B700D00EEFD70 /* pios_usb_hid_istr.h */, diff --git a/ground/src/shared/uavobjectdefinition/attituderaw.xml b/ground/src/shared/uavobjectdefinition/attituderaw.xml index 3e1e5e8f5..72d935818 100644 --- a/ground/src/shared/uavobjectdefinition/attituderaw.xml +++ b/ground/src/shared/uavobjectdefinition/attituderaw.xml @@ -2,10 +2,10 @@ The raw attitude sensor data from @ref AHRSCommsModule. Not always updated. - + - +