From c8d25ac7cfe4beab8f2a762497358eea1f2612dc Mon Sep 17 00:00:00 2001 From: JOhn Aughey Date: Fri, 15 Jul 2016 09:37:15 -0500 Subject: [PATCH 1/2] Removing the error condition if the processor isn't known. --- src/main/drivers/bus_spi.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/drivers/bus_spi.h b/src/main/drivers/bus_spi.h index dbba94881..5a6ea7dd3 100644 --- a/src/main/drivers/bus_spi.h +++ b/src/main/drivers/bus_spi.h @@ -31,8 +31,6 @@ #define SPI_IO_AF_MOSI_CFG IO_CONFIG(GPIO_Mode_AF_PP, GPIO_Speed_50MHz) #define SPI_IO_AF_MISO_CFG IO_CONFIG(GPIO_Mode_IN_FLOATING, GPIO_Speed_50MHz) #define SPI_IO_CS_CFG IO_CONFIG(GPIO_Mode_Out_PP, GPIO_Speed_50MHz) -#else -#error "Unknown processor" #endif /* From 81dd00298ae1f61ad9fe9e037cf32cad2e1bbf0a Mon Sep 17 00:00:00 2001 From: JOhn Aughey Date: Fri, 15 Jul 2016 09:37:30 -0500 Subject: [PATCH 2/2] Adding fake gyro/acc values for the new design --- src/main/sensors/initialisation.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/sensors/initialisation.c b/src/main/sensors/initialisation.c index 3ba1f439a..908606c36 100755 --- a/src/main/sensors/initialisation.c +++ b/src/main/sensors/initialisation.c @@ -118,9 +118,15 @@ static bool fakeGyroReadTemp(int16_t *tempData) return true; } + +static bool fakeGyroInitStatus(void) { + return true; +} + bool fakeGyroDetect(gyro_t *gyro) { gyro->init = fakeGyroInit; + gyro->intStatus = fakeGyroInitStatus; gyro->read = fakeGyroRead; gyro->temperature = fakeGyroReadTemp; gyro->scale = 1.0f / 16.4f; @@ -143,6 +149,7 @@ bool fakeAccDetect(acc_t *acc) { acc->init = fakeAccInit; acc->read = fakeAccRead; + acc->acc_1G = 512*8; acc->revisionCode = 0; return true; }