diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-05-12 21:01:59 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-05-12 21:01:59 +0000 |
commit | f5be820e9c8945c9995a917ede877b588c1cbba2 (patch) | |
tree | 8a8479874392a01bd04a568844b2979c30ed9865 /testhal/STM32/STM32F4xx | |
parent | fde8d50497ecccbe399ff2f57e5789b487d210b9 (diff) | |
download | ChibiOS-f5be820e9c8945c9995a917ede877b588c1cbba2.tar.gz ChibiOS-f5be820e9c8945c9995a917ede877b588c1cbba2.tar.bz2 ChibiOS-f5be820e9c8945c9995a917ede877b588c1cbba2.zip |
Fixes an improvements to EX demos
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9471 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32F4xx')
4 files changed, 9 insertions, 4 deletions
diff --git a/testhal/STM32/STM32F4xx/SPI-L3GD20/main.c b/testhal/STM32/STM32F4xx/SPI-L3GD20/main.c index fb4edfb21..e6e732898 100644 --- a/testhal/STM32/STM32F4xx/SPI-L3GD20/main.c +++ b/testhal/STM32/STM32F4xx/SPI-L3GD20/main.c @@ -113,12 +113,13 @@ int main(void) { */
l3gd20Start(&L3GD20D1, &l3gd20cfg);
- while(!palReadLine(LINE_BUTTON)){
+ while(!palReadLine(LINE_BUTTON)) {
chprintf(chp, "Press BTN to calibrate gyroscope...\r\n");
chThdSleepMilliseconds(150);
#if CHPRINTF_USE_ANSI_CODE
chprintf(chp, "\033[2J\033[1;1H");
#endif
+ }
palClearLine(LINE_LED3);
chprintf(chp, "Calibrating Gyroscope sampling bias...\r\n");
diff --git a/testhal/STM32/STM32F4xx/SPI-LIS302DL/main.c b/testhal/STM32/STM32F4xx/SPI-LIS302DL/main.c index 025789275..429f7b0bb 100644 --- a/testhal/STM32/STM32F4xx/SPI-LIS302DL/main.c +++ b/testhal/STM32/STM32F4xx/SPI-LIS302DL/main.c @@ -120,7 +120,7 @@ int main(void) { accelerometerReadCooked(&LIS302DLD1, cookeddata);
for(i = 0; i < LIS302DL_NUMBER_OF_AXES; i++)
- chprintf(chp, "COOKED-%c:%.3f\r\n", axesID[i], cookeddata[i]);
+ chprintf(chp, "COOKED-%c:%.3f g\r\n", axesID[i], cookeddata[i]);
chThdSleepMilliseconds(150);
#if CHPRINTF_USE_ANSI_CODE
diff --git a/testhal/STM32/STM32F4xx/SPI-LIS3DSH/debug/STM32F4xx-SPI-LIS3DSH (OpenOCD, Flash and Run).launch b/testhal/STM32/STM32F4xx/SPI-LIS3DSH/debug/STM32F4xx-SPI-LIS3DSH (OpenOCD, Flash and Run).launch index bfde2a1c3..df0961499 100644 --- a/testhal/STM32/STM32F4xx/SPI-LIS3DSH/debug/STM32F4xx-SPI-LIS3DSH (OpenOCD, Flash and Run).launch +++ b/testhal/STM32/STM32F4xx/SPI-LIS3DSH/debug/STM32F4xx-SPI-LIS3DSH (OpenOCD, Flash and Run).launch @@ -33,7 +33,7 @@ <intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="cr2-adc_lld_start_conversion-(format)" val="4"/><content id="CR2-adc-null-port_wait_for_interrupt-(format)" val="4"/><content id="CR2-adc-adcp-adc_lld_start_conversion-(format)" val="4"/><content id="null-lis3dshStart-(format)" val="2"/></contentList>"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="null-lis3dshStart-(format)" val="2"/><content id="CR2-adc-adcp-adc_lld_start_conversion-(format)" val="4"/><content id="CR2-adc-null-port_wait_for_interrupt-(format)" val="4"/><content id="cr2-adc_lld_start_conversion-(format)" val="4"/></contentList>"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <globalVariableList/> "/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList/> "/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
diff --git a/testhal/STM32/STM32F4xx/SPI-LIS3DSH/main.c b/testhal/STM32/STM32F4xx/SPI-LIS3DSH/main.c index 011a30cda..e67eda9b8 100644 --- a/testhal/STM32/STM32F4xx/SPI-LIS3DSH/main.c +++ b/testhal/STM32/STM32F4xx/SPI-LIS3DSH/main.c @@ -32,6 +32,7 @@ static LIS3DSHDriver LIS3DSHD1; static int32_t rawdata[LIS3DSH_NUMBER_OF_AXES];
static float cookeddata[LIS3DSH_NUMBER_OF_AXES];
+static int8_t temperature;
static char axesID[LIS3DSH_NUMBER_OF_AXES] = {'X', 'Y', 'Z'};
static uint32_t i;
@@ -121,7 +122,10 @@ int main(void) { accelerometerReadCooked(&LIS3DSHD1, cookeddata);
for(i = 0; i < LIS3DSH_NUMBER_OF_AXES; i++)
- chprintf(chp, "COOKED-%c:%.3f\r\n", axesID[i], cookeddata[i]);
+ chprintf(chp, "COOKED-%c:%.3f g\r\n", axesID[i], cookeddata[i]);
+
+ accelerometerGetTemp(&LIS3DSHD1, &temperature);
+ chprintf(chp, "TEMP:%d \r\n", temperature);
chThdSleepMilliseconds(150);
#if CHPRINTF_USE_ANSI_CODE
|