diff options
-rw-r--r-- | Makefile | 6 | ||||
-rwxr-xr-x | Tools/px_uploader.py | 17 | ||||
-rw-r--r-- | apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c | 29 | ||||
-rwxr-xr-x | nuttx/configs/px4fmu/nsh/defconfig | 4 |
4 files changed, 33 insertions, 23 deletions
@@ -114,6 +114,10 @@ endif upload: $(FIRMWARE_BUNDLE) $(UPLOADER) @python -u $(UPLOADER) --port $(SERIAL_PORTS) $(FIRMWARE_BUNDLE) + +upload-jtag-px4fmu: + @echo Attempting to flash PX4FMU board via JTAG + @openocd -f interface/olimex-jtag-tiny.cfg -f Tools/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx/nuttx" -c "flash write_image erase ../Bootloader/px4fmu_bl.elf" -c "reset run" -c shutdown # # Hacks and fixups @@ -129,7 +133,7 @@ endif # a complete re-compilation, 'distclean' should remove everything # that's generated leaving only files that are in source control. # -.PHONY: clean +.PHONY: clean upload-jtag-px4fmu clean: @make -C $(NUTTX_SRC) -r $(MQUIET) distclean @make -C $(ROMFS_SRC) -r $(MQUIET) clean diff --git a/Tools/px_uploader.py b/Tools/px_uploader.py index 7ebd37e75..2b5a6edde 100755 --- a/Tools/px_uploader.py +++ b/Tools/px_uploader.py @@ -263,8 +263,8 @@ class uploader(object): print("program...") self.__program(fw) - print("verify...") - self.__verify(fw) + #print("verify...") + #self.__verify(fw) print("done, rebooting.") self.__reboot() @@ -290,18 +290,7 @@ while True: # create an uploader attached to the port try: - if "linux" in _platform: - # Linux, don't open Mac OS and Win ports - if not "COM" in port and not "tty.usb" in port: - up = uploader(port, args.baud) - elif "darwin" in _platform: - # OS X, don't open Windows and Linux ports - if not "COM" in port and not "ACM" in port: - up = uploader(port, args.baud) - elif "win" in _platform: - # Windows, don't open POSIX ports - if not "/" in port: - up = uploader(port, args.baud) + up = uploader("\\\\.\\COM2", args.baud) except: # open failed, rate-limit our attempts time.sleep(0.05) diff --git a/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c b/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c index e5907f961..e443f6295 100644 --- a/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c +++ b/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c @@ -278,7 +278,7 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[]) overloadcounter++; } - int8_t update_vect[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1}; + int8_t update_vect[3] = {1, 1, 1}; float euler[3]; int32_t z_k_sizes = 9; float u[4] = {0.0f, 0.0f, 0.0f, 0.0f}; @@ -289,11 +289,28 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[]) if (!const_initialized /*&& dt < 0.05 && dt > 0.005*/) { dt = 0.005f; - knownConst[0] = 0.6f*0.6f*dt; - knownConst[1] = 0.6f*0.6f*dt; - knownConst[2] = 0.2f*0.2f*dt; - knownConst[3] = 0.2f*0.2f*dt; - knownConst[4] = 0.000001f*0.000001f*dt; // -9.81,1,1,-1}; + q[0] = 1e1; + q[1] = 1e1; + q[2] = 1e1; + q[3] = 1e-6; + q[4] = 1e-6; + q[5] = 1e-6; + q[6] = 1e-1; + q[7] = 1e-1; + q[8] = 1e-1; + q[9] = 1e-1; + q[10] = 1e-1; + q[11] = 1e-1; + + r[0]= 1e-2; + r[1]= 1e-2; + r[2]= 1e-2; + r[3]= 1e-1; + r[4]= 1e-1; + r[5]= 1e-1; + r[6]= 1e-1; + r[7]= 1e-1; + r[8]= 1e-1; x_aposteriori_k[0] = z_k[0]; x_aposteriori_k[1] = z_k[1]; diff --git a/nuttx/configs/px4fmu/nsh/defconfig b/nuttx/configs/px4fmu/nsh/defconfig index e1ba862cf..f49fc6107 100755 --- a/nuttx/configs/px4fmu/nsh/defconfig +++ b/nuttx/configs/px4fmu/nsh/defconfig @@ -236,8 +236,8 @@ CONFIG_AT24XX_MTD_BLOCKSIZE=256 CONFIG_SERIAL_TERMIOS=y CONFIG_SERIAL_CONSOLE_REINIT=y -CONFIG_USART1_SERIAL_CONSOLE=y -CONFIG_USART2_SERIAL_CONSOLE=n +CONFIG_USART1_SERIAL_CONSOLE=n +CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART3_SERIAL_CONSOLE=n CONFIG_UART4_SERIAL_CONSOLE=n CONFIG_UART5_SERIAL_CONSOLE=n |