From 30ce4a328d8e823c20b8ef28bafdc79c0a78ab62 Mon Sep 17 00:00:00 2001 From: bsongis Date: Mon, 7 Oct 2013 17:32:50 +0000 Subject: [PATCH] [Taranis] Altitude played without decimal when >= 10m [Taranis] WDT and Timers paused when on a breakpoint --- src/Makefile | 5 +++-- src/targets/taranis/board_taranis.cpp | 6 ++++++ src/translations/en.h | 2 +- src/translations/tts_cz.cpp | 12 ++++++------ src/translations/tts_de.cpp | 12 ++++++------ src/translations/tts_en.cpp | 12 ++++++------ src/translations/tts_es.cpp | 12 ++++++------ src/translations/tts_fr.cpp | 12 ++++++------ src/translations/tts_it.cpp | 12 ++++++------ src/translations/tts_pt.cpp | 12 ++++++------ src/translations/tts_se.cpp | 12 ++++++------ src/translations/tts_sk.cpp | 12 ++++++------ 12 files changed, 64 insertions(+), 57 deletions(-) diff --git a/src/Makefile b/src/Makefile index 32df9543d..c31feb668 100644 --- a/src/Makefile +++ b/src/Makefile @@ -615,6 +615,7 @@ ifeq ($(PCB), TARANIS) SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/misc.c SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c + SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dbgmcu.c SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rcc.c SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_spi.c SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dma.c @@ -1069,8 +1070,8 @@ stamp_header: @echo @echo "Generate Version-stamp:" @echo "//Automatically generated file (Makefile) - do not edit" > stamp-opentx.h - @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" >> stamp-opentx.h - @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx.h + @echo "#define DATE_STR \"`date +%Y-%m-%d | tr -d '\r\n'`\"" >> stamp-opentx.h + @echo "#define TIME_STR \"`date +%H:%M:%S | tr -d '\r\n'`\"" >> stamp-opentx.h @echo "#define SVN_STR \"opentx-r$(SVNREV)\"" >> stamp-opentx.h @cat stamp-opentx.h diff --git a/src/targets/taranis/board_taranis.cpp b/src/targets/taranis/board_taranis.cpp index 52cc890d4..ce3c664ee 100644 --- a/src/targets/taranis/board_taranis.cpp +++ b/src/targets/taranis/board_taranis.cpp @@ -39,6 +39,7 @@ extern "C" { #include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_dcd_int.h" #include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_bsp.h" +#include "stm32f2xx_dbgmcu.h" } volatile uint32_t Tenms ; // TODO to remove everywhere / use a #define @@ -198,6 +199,11 @@ void boardInit() eepromInit(); sportInit(); usbInit(); + +#if defined(DEBUG) + DBGMCU_APB1PeriphConfig(DBGMCU_IWDG_STOP|DBGMCU_TIM1_STOP|DBGMCU_TIM2_STOP|DBGMCU_TIM3_STOP|DBGMCU_TIM6_STOP|DBGMCU_TIM8_STOP|DBGMCU_TIM10_STOP|DBGMCU_TIM13_STOP|DBGMCU_TIM14_STOP, ENABLE); +#endif + } #endif diff --git a/src/translations/en.h b/src/translations/en.h index 5a581c13d..d05e22125 100644 --- a/src/translations/en.h +++ b/src/translations/en.h @@ -167,7 +167,7 @@ #define TR_PLAY_TRACK "Play Track" #endif #define TR_PLAY_BOTH "Play Both\0" - #define TR_PLAY_VALUE "Play Val\0 " + #define TR_PLAY_VALUE TR("Play Val\0 ", "Play Value") #else #define TR_PLAY_TRACK "[Play Trk]" #define TR_PLAY_BOTH "[Play Bth]" diff --git a/src/translations/tts_cz.cpp b/src/translations/tts_cz.cpp index 52ba7c370..48059076b 100644 --- a/src/translations/tts_cz.cpp +++ b/src/translations/tts_cz.cpp @@ -122,14 +122,14 @@ I18N_PLAY_FUNCTION(cz, playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (IS_IMPERIAL_ENABLE()) { if (unit == UNIT_METERS) { unit = UNIT_FEET; -#if defined(CPUARM) - if (att & PREC1) { - number /= 10; - att -= PREC1; - } -#endif } } +#if defined(CPUARM) + if (unit == UNIT_METERS && number >= 100 && (att & PREC1)) { + number /= 10; + att -= PREC1; + } +#endif unit++; } diff --git a/src/translations/tts_de.cpp b/src/translations/tts_de.cpp index 2eace442f..234bd0d82 100644 --- a/src/translations/tts_de.cpp +++ b/src/translations/tts_de.cpp @@ -112,14 +112,14 @@ I18N_PLAY_FUNCTION(de, playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (IS_IMPERIAL_ENABLE()) { if (unit == UNIT_METERS) { unit = UNIT_FEET; -#if defined(CPUARM) - if (att & PREC1) { - number /= 10; - att -= PREC1; - } -#endif } } +#if defined(CPUARM) + if (unit == UNIT_METERS && number >= 100 && (att & PREC1)) { + number /= 10; + att -= PREC1; + } +#endif unit++; } diff --git a/src/translations/tts_en.cpp b/src/translations/tts_en.cpp index f9f166d07..cc36d648d 100644 --- a/src/translations/tts_en.cpp +++ b/src/translations/tts_en.cpp @@ -99,14 +99,14 @@ I18N_PLAY_FUNCTION(en, playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (IS_IMPERIAL_ENABLE()) { if (unit == UNIT_METERS) { unit = UNIT_FEET; -#if defined(CPUARM) - if (att & PREC1) { - number /= 10; - att -= PREC1; - } -#endif } } +#if defined(CPUARM) + if (unit == UNIT_METERS && number >= 100 && (att & PREC1)) { + number /= 10; + att -= PREC1; + } +#endif unit++; } diff --git a/src/translations/tts_es.cpp b/src/translations/tts_es.cpp index e7d62d420..2765de647 100644 --- a/src/translations/tts_es.cpp +++ b/src/translations/tts_es.cpp @@ -136,14 +136,14 @@ I18N_PLAY_FUNCTION(es, playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (IS_IMPERIAL_ENABLE()) { if (unit == UNIT_METERS) { unit = UNIT_FEET; -#if defined(CPUARM) - if (att & PREC1) { - number /= 10; - att -= PREC1; - } -#endif } } +#if defined(CPUARM) + if (unit == UNIT_METERS && number >= 100 && (att & PREC1)) { + number /= 10; + att -= PREC1; + } +#endif unit++; } diff --git a/src/translations/tts_fr.cpp b/src/translations/tts_fr.cpp index 8d47bcd24..0a74b483d 100644 --- a/src/translations/tts_fr.cpp +++ b/src/translations/tts_fr.cpp @@ -118,14 +118,14 @@ I18N_PLAY_FUNCTION(fr, playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (IS_IMPERIAL_ENABLE()) { if (unit == UNIT_METERS) { unit = UNIT_FEET; -#if defined(CPUARM) - if (att & PREC1) { - number /= 10; - att -= PREC1; - } -#endif } } +#if defined(CPUARM) + if (unit == UNIT_METERS && number >= 100 && (att & PREC1)) { + number /= 10; + att -= PREC1; + } +#endif unit++; } diff --git a/src/translations/tts_it.cpp b/src/translations/tts_it.cpp index cbc7981d9..5e5988009 100644 --- a/src/translations/tts_it.cpp +++ b/src/translations/tts_it.cpp @@ -108,14 +108,14 @@ I18N_PLAY_FUNCTION(it, playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (IS_IMPERIAL_ENABLE()) { if (unit == UNIT_METERS) { unit = UNIT_FEET; -#if defined(CPUARM) - if (att & PREC1) { - number /= 10; - att -= PREC1; - } -#endif } } +#if defined(CPUARM) + if (unit == UNIT_METERS && number >= 100 && (att & PREC1)) { + number /= 10; + att -= PREC1; + } +#endif unit++; } diff --git a/src/translations/tts_pt.cpp b/src/translations/tts_pt.cpp index aaf27d102..615e5ec2d 100644 --- a/src/translations/tts_pt.cpp +++ b/src/translations/tts_pt.cpp @@ -121,14 +121,14 @@ I18N_PLAY_FUNCTION(pt, playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (IS_IMPERIAL_ENABLE()) { if (unit == UNIT_METERS) { unit = UNIT_FEET; -#if defined(CPUARM) - if (att & PREC1) { - number /= 10; - att -= PREC1; - } -#endif } } +#if defined(CPUARM) + if (unit == UNIT_METERS && number >= 100 && (att & PREC1)) { + number /= 10; + att -= PREC1; + } +#endif unit++; } diff --git a/src/translations/tts_se.cpp b/src/translations/tts_se.cpp index 848e9e344..4fbf111d1 100644 --- a/src/translations/tts_se.cpp +++ b/src/translations/tts_se.cpp @@ -86,14 +86,14 @@ I18N_PLAY_FUNCTION(se, playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (IS_IMPERIAL_ENABLE()) { if (unit == UNIT_METERS) { unit = UNIT_FEET; -#if defined(CPUARM) - if (att & PREC1) { - number /= 10; - att -= PREC1; - } -#endif } } +#if defined(CPUARM) + if (unit == UNIT_METERS && number >= 100 && (att & PREC1)) { + number /= 10; + att -= PREC1; + } +#endif unit++; } diff --git a/src/translations/tts_sk.cpp b/src/translations/tts_sk.cpp index 8528608d4..1fadc6a8d 100644 --- a/src/translations/tts_sk.cpp +++ b/src/translations/tts_sk.cpp @@ -137,14 +137,14 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (IS_IMPERIAL_ENABLE()) { if (unit == UNIT_METERS) { unit = UNIT_FEET; -#if defined(CPUARM) - if (att & PREC1) { - number /= 10; - att -= PREC1; - } -#endif } } +#if defined(CPUARM) + if (unit == UNIT_METERS && number >= 100 && (att & PREC1)) { + number /= 10; + att -= PREC1; + } +#endif unit++; }