From 8e3f90dba00ebae70457f0a004f34f85aba9e5c0 Mon Sep 17 00:00:00 2001 From: but0n Date: Fri, 2 Dec 2016 22:54:34 +0800 Subject: [PATCH] [FIX]: before install --- .travis.yml | 1 - libs/include/motor.h | 2 +- libs/include/pid.h | 6 +-- openjtag.cfg | 11 ------ openocd.cfg | 92 -------------------------------------------- stm32f1x.cfg | 81 -------------------------------------- 6 files changed, 4 insertions(+), 189 deletions(-) delete mode 100644 openjtag.cfg delete mode 100644 openocd.cfg delete mode 100644 stm32f1x.cfg diff --git a/.travis.yml b/.travis.yml index 9b5dd5a..6627211 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ osx_image: xcode language: c before_install: - brew update - - brew install coreutils - brew tap px4/px4 - brew install gcc-arm-none-eabi script: make diff --git a/libs/include/motor.h b/libs/include/motor.h index 327f5a4..3abf216 100644 --- a/libs/include/motor.h +++ b/libs/include/motor.h @@ -13,7 +13,7 @@ #define THROTTLE_MAX (unsigned short)3600 //2ms - top position of throttle #define THROTTLE_MIN (unsigned short)1620 //0.9ms - bottom position of throttle -#define THROTTLE_MID (unsigned short)2000 +#define THROTTLE_MID (unsigned short)2200 #ifdef MOTOR_NORMAL_STARTUP #define MOTOR_SETTING() {\ diff --git a/libs/include/pid.h b/libs/include/pid.h index 308ce68..02bded8 100644 --- a/libs/include/pid.h +++ b/libs/include/pid.h @@ -3,13 +3,13 @@ extern float g_Yaw, g_Pitch, g_Roll; //eular -#define OUTTER_LOOP_KP 0.3f //0.257 * 0.83 0.255 +#define OUTTER_LOOP_KP 0 //0.257 * 0.83 0.255 #define OUTTER_LOOP_KI 0 #define OUTTER_LOOP_KD 0 -#define INNER_LOOP_KP 0.08f +#define INNER_LOOP_KP 0.018f #define INNER_LOOP_KI 0 -#define INNER_LOOP_KD 0 +#define INNER_LOOP_KD 0.4f #define SUM_ERRO_MAX 900 #define SUM_ERRO_MIN -900 diff --git a/openjtag.cfg b/openjtag.cfg deleted file mode 100644 index 8253143..0000000 --- a/openjtag.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# -# 100ASK OpenJTAG -# -# http://www.100ask.net -# - -interface ft2232 -ft2232_device_desc "USB<=>JTAG&RS232" -ft2232_layout jtagkey -ft2232_vid_pid 0x1457 0x5118 -#jtag_khz 1000 diff --git a/openocd.cfg b/openocd.cfg deleted file mode 100644 index 7e58d48..0000000 --- a/openocd.cfg +++ /dev/null @@ -1,92 +0,0 @@ -#daemon configuration############################################################### -telnet_port 4444 -gdb_port 3333 - -#interface configuration openjtag############################# -interface ft2232 -ft2232_device_desc "USB<=>JTAG&RS232" -ft2232_layout jtagkey -ft2232_vid_pid 0x1457 0x5118 - -#board configuration################################################################ -# Adjust Work-area size (RAM size) according to MCU in use: -#STM32F103RB --> 20KB -#set WORKAREASIZE 0x5000 -#STM32F103ZE --> 64KB -set WORKAREASIZE 0x10000 - -#target configuration############################################################### -# script for stm32f1x family -if { [info exists CHIPNAME] } { -set _CHIPNAME $CHIPNAME -} else { -set _CHIPNAME stm32f1x -} -if { [info exists ENDIAN] } { -set _ENDIAN $ENDIAN -} else { -set _ENDIAN little -} -# Work-area is a space in RAM used for flash programming -# By default use 16kB -if { [info exists WORKAREASIZE] } { - set _WORKAREASIZE $WORKAREASIZE -} else { - set _WORKAREASIZE 0x4000 -} -# JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz -adapter_khz 500 -adapter_nsrst_delay 100 -jtag_ntrst_delay 100 -#jtag scan chain -if { [info exists CPUTAPID] } { - set _CPUTAPID $CPUTAPID -} else { -# See STM Document RM0008 -# Section 31.6.3 - set _CPUTAPID 0x3ba00477 -} -jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID -if { [info exists BSTAPID] } { -# FIXME this never gets used to override defaults... - set _BSTAPID $BSTAPID -} else { -# See STM Document RM0008 -# Section 31.6.2 -# Low density devices, Rev A - set _BSTAPID1 0x06412041 -# Medium density devices, Rev A - set _BSTAPID2 0x06410041 -# Medium density devices, Rev B and Rev Z - - set _BSTAPID3 0x16410041 - set _BSTAPID4 0x06420041 -# High density devices, Rev A - set _BSTAPID5 0x06414041 -# Connectivity line devices, Rev A and Rev Z - set _BSTAPID6 0x06418041 -# XL line devices, Rev A - set _BSTAPID7 0x06430041 -# VL line devices, Rev A and Z In medium-density and high-density value line devices - set _BSTAPID8 0x06420041 -# VL line devices, Rev A - set _BSTAPID9 0x06428041 -} -jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \ - -expected-id $_BSTAPID2 -expected-id $_BSTAPID3 \ - -expected-id $_BSTAPID4 -expected-id $_BSTAPID5 \ - -expected-id $_BSTAPID6 -expected-id $_BSTAPID7 \ - -expected-id $_BSTAPID8 -expected-id $_BSTAPID9 - -set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME cortex_m -endian $_ENDIAN -chain-position $_TARGETNAME - -$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 - -# flash size will be probed -set _FLASHNAME $_CHIPNAME.flash -flash bank $_FLASHNAME stm32f1x 0x08000000 0 0 0 $_TARGETNAME - -# if srst is not fitted use SYSRESETREQ to -# perform a soft reset -cortex_m reset_config sysresetreq diff --git a/stm32f1x.cfg b/stm32f1x.cfg deleted file mode 100644 index 7d3f42f..0000000 --- a/stm32f1x.cfg +++ /dev/null @@ -1,81 +0,0 @@ -# script for stm32f1x family - -if { [info exists CHIPNAME] } { - set _CHIPNAME $CHIPNAME -} else { - set _CHIPNAME stm32f1x -} - -if { [info exists ENDIAN] } { - set _ENDIAN $ENDIAN -} else { - set _ENDIAN little -} - -# Work-area is a space in RAM used for flash programming -# By default use 16kB -if { [info exists WORKAREASIZE] } { - set _WORKAREASIZE $WORKAREASIZE -} else { - set _WORKAREASIZE 0x4000 -} - -# JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz -adapter_khz 1000 - -adapter_nsrst_delay 100 -jtag_ntrst_delay 100 - -#jtag scan chain -if { [info exists CPUTAPID] } { - set _CPUTAPID $CPUTAPID -} else { - # See STM Document RM0008 - # Section 26.6.3 - set _CPUTAPID 0x3ba00477 -} -jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID - -if { [info exists BSTAPID] } { - # FIXME this never gets used to override defaults... - set _BSTAPID $BSTAPID -} else { - # See STM Document RM0008 - # Section 29.6.2 - # Low density devices, Rev A - set _BSTAPID1 0x06412041 - # Medium density devices, Rev A - set _BSTAPID2 0x06410041 - # Medium density devices, Rev B and Rev Z - set _BSTAPID3 0x16410041 - set _BSTAPID4 0x06420041 - # High density devices, Rev A - set _BSTAPID5 0x06414041 - # Connectivity line devices, Rev A and Rev Z - set _BSTAPID6 0x06418041 - # XL line devices, Rev A - set _BSTAPID7 0x06430041 - # VL line devices, Rev A and Z In medium-density and high-density value line devices - set _BSTAPID8 0x06420041 - # VL line devices, Rev A - set _BSTAPID9 0x06428041 - -} -jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \ - -expected-id $_BSTAPID2 -expected-id $_BSTAPID3 \ - -expected-id $_BSTAPID4 -expected-id $_BSTAPID5 \ - -expected-id $_BSTAPID6 -expected-id $_BSTAPID7 \ - -expected-id $_BSTAPID8 -expected-id $_BSTAPID9 - -set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME cortex_m -endian $_ENDIAN -chain-position $_TARGETNAME - -$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 - -# flash size will be probed -set _FLASHNAME $_CHIPNAME.flash -flash bank $_FLASHNAME stm32f1x 0x08000000 0 0 0 $_TARGETNAME - -# if srst is not fitted use SYSRESETREQ to -# perform a soft reset -cortex_m reset_config sysresetreq