From 65e6938779e03611c1b234718f80d9a9eaa2f7fb Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Tue, 17 Oct 2023 14:28:09 -0400 Subject: [PATCH] board: ARK CAN RTK GPS enable ekf2 --- ROMFS/cannode/init.d/rcS | 4 ++- boards/ark/can-rtk-gps/default.px4board | 16 ++++++--- .../can-rtk-gps/nuttx-config/nsh/defconfig | 35 ------------------- boards/ark/can-rtk-gps/src/init.c | 3 +- src/drivers/gps/gps.cpp | 3 +- src/modules/ekf2/EKF2.hpp | 2 +- 6 files changed, 18 insertions(+), 45 deletions(-) diff --git a/ROMFS/cannode/init.d/rcS b/ROMFS/cannode/init.d/rcS index 0d9da3a10a..1e4add8bbb 100644 --- a/ROMFS/cannode/init.d/rcS +++ b/ROMFS/cannode/init.d/rcS @@ -67,6 +67,9 @@ then fi unset BOARD_RC_DEFAULTS +# start uavcannode as early as possible to pet the watchdog +uavcannode start + # # Start system state indicator. # @@ -114,5 +117,4 @@ param set-default SENS_MAG_RATE 100 sensors start -uavcannode start unset R diff --git a/boards/ark/can-rtk-gps/default.px4board b/boards/ark/can-rtk-gps/default.px4board index b74e74a630..016263727c 100644 --- a/boards/ark/can-rtk-gps/default.px4board +++ b/boards/ark/can-rtk-gps/default.px4board @@ -21,15 +21,21 @@ CONFIG_UAVCANNODE_RTK_DATA=y CONFIG_UAVCANNODE_SAFETY_BUTTON=y CONFIG_UAVCANNODE_STATIC_PRESSURE=y CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y -CONFIG_MODULES_GYRO_CALIBRATION=y -CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y +CONFIG_MODULES_EKF2=y +# CONFIG_EKF2_AUXVEL is not set +# CONFIG_EKF2_EXTERNAL_VISION is not set +# CONFIG_EKF2_GNSS_YAW is not set +# CONFIG_EKF2_GRAVITY_FUSION is not set +# CONFIG_EKF2_RANGE_FINDER is not set +# CONFIG_EKF2_WIND is not set CONFIG_MODULES_SENSORS=y # CONFIG_SENSORS_VEHICLE_AIRSPEED is not set -# CONFIG_SENSORS_VEHICLE_AIR_DATA is not set -# CONFIG_SENSORS_VEHICLE_GPS_POSITION is not set +# CONFIG_SENSORS_VEHICLE_ANGULAR_VELOCITY is not set +# CONFIG_SENSORS_VEHICLE_ACCELERATION is not set +# CONFIG_SENSORS_VEHICLE_OPTICAL_FLOW is not set +CONFIG_SYSTEMCMDS_I2CDETECT=y CONFIG_SYSTEMCMDS_PARAM=y CONFIG_SYSTEMCMDS_PERF=y -CONFIG_SYSTEMCMDS_REBOOT=y CONFIG_SYSTEMCMDS_SYSTEM_TIME=y CONFIG_SYSTEMCMDS_TOP=y CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y diff --git a/boards/ark/can-rtk-gps/nuttx-config/nsh/defconfig b/boards/ark/can-rtk-gps/nuttx-config/nsh/defconfig index 34d42179c7..c57ea1dd6b 100644 --- a/boards/ark/can-rtk-gps/nuttx-config/nsh/defconfig +++ b/boards/ark/can-rtk-gps/nuttx-config/nsh/defconfig @@ -27,7 +27,6 @@ # CONFIG_NSH_DISABLE_LOOPS is not set # CONFIG_NSH_DISABLE_LS is not set # CONFIG_NSH_DISABLE_MKDIR is not set -# CONFIG_NSH_DISABLE_MKFATFS is not set # CONFIG_NSH_DISABLE_MOUNT is not set # CONFIG_NSH_DISABLE_MV is not set # CONFIG_NSH_DISABLE_PS is not set @@ -66,17 +65,8 @@ CONFIG_DEBUG_HARDFAULT_ALERT=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEBUG_TCBINFO=y CONFIG_DEFAULT_SMALL=y -CONFIG_DEV_FIFO_SIZE=0 -CONFIG_DEV_PIPE_MAXSIZE=1024 -CONFIG_DEV_PIPE_SIZE=70 CONFIG_FDCLONE_STDIO=y -CONFIG_FS_BINFS=y CONFIG_FS_CROMFS=y -CONFIG_FS_FAT=y -CONFIG_FS_FATTIME=y -CONFIG_FS_PROCFS=y -CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y -CONFIG_FS_PROCFS_REGISTER=y CONFIG_FS_ROMFS=y CONFIG_GRAN=y CONFIG_GRAN_INTR=y @@ -90,14 +80,9 @@ CONFIG_INIT_STACKSIZE=2624 CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_LONG_LONG=y CONFIG_LIBC_MAX_EXITFUNS=1 -CONFIG_LIBC_STRERROR=y CONFIG_MEMSET_64BIT=y CONFIG_MEMSET_OPTSPEED=y CONFIG_MM_REGIONS=2 -CONFIG_MTD=y -CONFIG_MTD_BYTE_WRITE=y -CONFIG_MTD_PARTITION=y -CONFIG_MTD_RAMTRON=y CONFIG_NAME_MAX=40 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARGCAT=y @@ -110,37 +95,22 @@ CONFIG_NSH_NESTDEPTH=8 CONFIG_NSH_QUOTE=y CONFIG_NSH_ROMFSETC=y CONFIG_NSH_ROMFSSECTSIZE=128 -CONFIG_NSH_STRERROR=y CONFIG_NSH_VARS=y -CONFIG_PIPES=y CONFIG_PREALLOC_TIMERS=50 -CONFIG_PRIORITY_INHERITANCE=y CONFIG_PTHREAD_MUTEX_ROBUST=y CONFIG_PTHREAD_STACK_MIN=512 -CONFIG_RAMTRON_EMULATE_PAGE_SHIFT=5 -CONFIG_RAMTRON_EMULATE_SECTOR_SHIFT=5 -CONFIG_RAMTRON_SETSPEED=y CONFIG_RAM_SIZE=262144 CONFIG_RAM_START=0x20000000 CONFIG_RAW_BINARY=y -CONFIG_RTC_DATETIME=y -CONFIG_SCHED_HPWORK=y -CONFIG_SCHED_HPWORKPRIORITY=249 -CONFIG_SCHED_HPWORKSTACKSIZE=1280 CONFIG_SCHED_INSTRUMENTATION=y CONFIG_SCHED_INSTRUMENTATION_EXTERNAL=y CONFIG_SCHED_INSTRUMENTATION_SWITCH=y -CONFIG_SCHED_LPWORK=y -CONFIG_SCHED_LPWORKPRIORITY=50 -CONFIG_SCHED_LPWORKSTACKSIZE=1632 CONFIG_SCHED_WAITPID=y -CONFIG_SEM_PREALLOCHOLDERS=32 CONFIG_SERIAL_TERMIOS=y CONFIG_SIG_DEFAULT=y CONFIG_SIG_SIGALRM_ACTION=y CONFIG_SIG_SIGUSR1_ACTION=y CONFIG_SIG_SIGUSR2_ACTION=y -CONFIG_SIG_SIGWORK=4 CONFIG_STACK_COLORATION=y CONFIG_START_DAY=30 CONFIG_START_MONTH=11 @@ -155,11 +125,6 @@ CONFIG_STM32_I2C1=y CONFIG_STM32_I2C2=y CONFIG_STM32_JTAG_SW_ENABLE=y CONFIG_STM32_PWR=y -CONFIG_STM32_RTC=y -CONFIG_STM32_RTC_HSECLOCK=y -CONFIG_STM32_RTC_MAGIC=0xfacefeee -CONFIG_STM32_RTC_MAGIC_REG=1 -CONFIG_STM32_RTC_MAGIC_TIME_SET=0xfacefeef CONFIG_STM32_SERIALBRK_BSDCOMPAT=y CONFIG_STM32_SERIAL_DISABLE_REORDERING=y CONFIG_STM32_SPI1=y diff --git a/boards/ark/can-rtk-gps/src/init.c b/boards/ark/can-rtk-gps/src/init.c index 7405575781..61226d6754 100644 --- a/boards/ark/can-rtk-gps/src/init.c +++ b/boards/ark/can-rtk-gps/src/init.c @@ -162,8 +162,7 @@ __EXPORT int board_app_initialize(uintptr_t arg) #endif // FLASH_BASED_PARAMS /* Configure the HW based on the manifest */ - - px4_platform_configure(); + //px4_platform_configure(); return OK; } diff --git a/src/drivers/gps/gps.cpp b/src/drivers/gps/gps.cpp index 4ed29a8c6e..bd8c21e9e6 100644 --- a/src/drivers/gps/gps.cpp +++ b/src/drivers/gps/gps.cpp @@ -1167,8 +1167,9 @@ GPS::print_status() PX4_INFO("rate publication:\t\t%6.2f Hz", (double)_rate); PX4_INFO("rate RTCM injection:\t%6.2f Hz", (double)_rate_rtcm_injection); - +#ifndef CONSTRAINED_FLASH print_message(ORB_ID(sensor_gps), _report_gps_pos); +#endif // !CONSTRAINED_FLASH } if (_instance == Instance::Main && _secondary_instance.load()) { diff --git a/src/modules/ekf2/EKF2.hpp b/src/modules/ekf2/EKF2.hpp index b60969113b..4e48b4a85a 100644 --- a/src/modules/ekf2/EKF2.hpp +++ b/src/modules/ekf2/EKF2.hpp @@ -517,7 +517,7 @@ private: #endif // CONFIG_EKF2_GNSS #if defined(CONFIG_EKF2_GRAVITY_FUSION) - hrt_abstime _status_gravity_pub_last{0}; + hrt_abstime _status_gravity_pub_last {0}; uORB::PublicationMulti _estimator_aid_src_gravity_pub{ORB_ID(estimator_aid_src_gravity)}; #endif // CONFIG_EKF2_GRAVITY_FUSION