From 402de293d68b0e0bde8a8e84380231793012becf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 8 Apr 2023 14:27:51 +1000 Subject: [PATCH] Tools: text messages and more defines --- Tools/ardupilotwaf/boards.py | 3 --- Tools/ardupilotwaf/chibios.py | 5 ----- Tools/autotest/arducopter.py | 8 ++++---- Tools/autotest/web-firmware/index.html | 2 +- Tools/scripts/build_options.py | 8 ++++---- Tools/scripts/decode_devid.py | 8 ++++---- 6 files changed, 13 insertions(+), 21 deletions(-) diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 8054b1b49c..d8dae5af9f 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -439,9 +439,6 @@ class Board: ) env.DEFINES.update( - UAVCAN_CPP_VERSION = 'UAVCAN_CPP03', - UAVCAN_NO_ASSERTIONS = 1, - UAVCAN_NULLPTR = 'nullptr', DRONECAN_CXX_WRAPPERS = 1, USE_USER_HELPERS = 1, CANARD_ENABLE_DEADLINE = 1, diff --git a/Tools/ardupilotwaf/chibios.py b/Tools/ardupilotwaf/chibios.py index 67920c4c3f..2c7d35bbc4 100644 --- a/Tools/ardupilotwaf/chibios.py +++ b/Tools/ardupilotwaf/chibios.py @@ -450,11 +450,6 @@ def setup_canmgr_build(cfg): ] env.CFLAGS += ['-DHAL_CAN_IFACES=2'] - env.DEFINES += [ - 'UAVCAN_CPP_VERSION=UAVCAN_CPP03', - 'UAVCAN_NO_ASSERTIONS=1', - 'UAVCAN_NULLPTR=nullptr' - ] if not env.AP_PERIPH: env.DEFINES += [ 'DRONECAN_CXX_WRAPPERS=1', diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 8cf4ea09b4..4729468177 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -2591,8 +2591,8 @@ class AutoTestCopter(AutoTest): self.reboot_sitl() # Test UAVCAN GPS ordering working - gps1_det_text = self.wait_text("GPS 1: specified as UAVCAN.*", regex=True, check_context=True) - gps2_det_text = self.wait_text("GPS 2: specified as UAVCAN.*", regex=True, check_context=True) + gps1_det_text = self.wait_text("GPS 1: specified as DroneCAN.*", regex=True, check_context=True) + gps2_det_text = self.wait_text("GPS 2: specified as DroneCAN.*", regex=True, check_context=True) gps1_nodeid = int(gps1_det_text.split('-')[1]) gps2_nodeid = int(gps2_det_text.split('-')[1]) if gps1_nodeid is None or gps2_nodeid is None: @@ -2622,11 +2622,11 @@ class AutoTestCopter(AutoTest): gps1_det_text = None gps2_det_text = None try: - gps1_det_text = self.wait_text("GPS 1: specified as UAVCAN.*", regex=True, check_context=True) + gps1_det_text = self.wait_text("GPS 1: specified as DroneCAN.*", regex=True, check_context=True) except AutoTestTimeoutException: pass try: - gps2_det_text = self.wait_text("GPS 2: specified as UAVCAN.*", regex=True, check_context=True) + gps2_det_text = self.wait_text("GPS 2: specified as DroneCAN.*", regex=True, check_context=True) except AutoTestTimeoutException: pass diff --git a/Tools/autotest/web-firmware/index.html b/Tools/autotest/web-firmware/index.html index af07270203..cd23bd9581 100644 --- a/Tools/autotest/web-firmware/index.html +++ b/Tools/autotest/web-firmware/index.html @@ -97,7 +97,7 @@ The software and hardware we provide is only for use in unmanned CompanionCompanion - Companion Computer example code and Images

AP_PeriphAP_Periph - UAVCAN Peripheral Firmware

+ alt="AP_Periph">AP_Periph - DroneCAN Peripheral Firmware

FilterToolFilterTool - Filter Analysis Tool

diff --git a/Tools/scripts/build_options.py b/Tools/scripts/build_options.py index 4973c1fa00..1b40d75316 100644 --- a/Tools/scripts/build_options.py +++ b/Tools/scripts/build_options.py @@ -145,7 +145,7 @@ BUILD_OPTIONS = [ Feature('Compass', 'MMC5XX3', 'AP_COMPASS_MMC5XX3_ENABLED', 'Enable MMC5XX3 compasses', 1, None), Feature('Compass', 'QMC5883L', 'AP_COMPASS_QMC5883L_ENABLED', 'Enable QMC5883L compasses', 1, None), Feature('Compass', 'RM3100', 'AP_COMPASS_RM3100_ENABLED', 'Enable RM3100 compasses', 1, None), - Feature('Compass', 'UAVCAN_COMPASS', 'AP_COMPASS_DRONECAN_ENABLED', 'Enable UAVCAN compasses', 0, None), + Feature('Compass', 'DRONECAN_COMPASS', 'AP_COMPASS_DRONECAN_ENABLED', 'Enable DroneCAN compasses', 0, None), Feature('Gimbal', 'MOUNT', 'HAL_MOUNT_ENABLED', 'Enable Mount', 0, None), Feature('Gimbal', 'ALEXMOS', 'HAL_MOUNT_ALEXMOS_ENABLED', 'Enable Alexmos Gimbal', 0, "MOUNT"), @@ -202,7 +202,7 @@ BUILD_OPTIONS = [ # Feature('Rangefinder', 'RANGEFINDER_SIM', 'AP_RANGEFINDER_SIM_ENABLED', "Enable Rangefinder - SIM", 0, "RANGEFINDER"), # NOQA: E501 Feature('Rangefinder', 'RANGEFINDER_TRI2C', 'AP_RANGEFINDER_TRI2C_ENABLED', "Enable Rangefinder - TeraRangerI2C", 0, "RANGEFINDER"), # NOQA: E501 Feature('Rangefinder', 'RANGEFINDER_TR_SERIAL', 'AP_RANGEFINDER_TERARANGER_SERIAL_ENABLED', "Enable Rangefinder - TeraRanger Serial", 0, "RANGEFINDER"), # NOQA: E501 - Feature('Rangefinder', 'RANGEFINDER_UAVCAN', 'AP_RANGEFINDER_DRONECAN_ENABLED', "Enable Rangefinder - UAVCAN", 0, "RANGEFINDER"), # NOQA: E501 + Feature('Rangefinder', 'RANGEFINDER_DRONECAN', 'AP_RANGEFINDER_DRONECAN_ENABLED', "Enable Rangefinder - DroneCAN", 0, "RANGEFINDER"), # NOQA: E501 Feature('Rangefinder', 'RANGEFINDER_USD1_CAN', 'AP_RANGEFINDER_USD1_CAN_ENABLED', "Enable Rangefinder - USD1 (CAN)", 0, "RANGEFINDER"), # NOQA: E501 Feature('Rangefinder', 'RANGEFINDER_USD1_SERIAL', 'AP_RANGEFINDER_USD1_SERIAL_ENABLED', "Enable Rangefinder - USD1 (SERIAL)", 0, "RANGEFINDER"), # NOQA: E501 Feature('Rangefinder', 'RANGEFINDER_VL53L0X', 'AP_RANGEFINDER_VL53L0X_ENABLED', "Enable Rangefinder - VL53L0X", 0, "RANGEFINDER"), # NOQA: E501 @@ -231,7 +231,7 @@ BUILD_OPTIONS = [ Feature('Sensors', 'MS56XX', 'AP_BARO_MS56XX_ENABLED', 'Enable MS56XX Barometric Sensor', 1, None), Feature('Sensors', 'MSP_BARO', 'AP_BARO_MSP_ENABLED', 'Enable MSP Barometric Sensor', 0, 'MSP'), Feature('Sensors', 'SPL06', 'AP_BARO_SPL06_ENABLED', 'Enable SPL06 Barometric Sensor', 1, None), - Feature('Sensors', 'UAVCAN_BARO', 'AP_BARO_DRONECAN_ENABLED', 'Enable UAVCAN Barometric Sensor', 0, None), + Feature('Sensors', 'DRONECAN_BARO', 'AP_BARO_DRONECAN_ENABLED', 'Enable DroneCAN Barometric Sensor', 0, None), Feature('Sensors', 'ICP101XX', 'AP_BARO_ICP101XX_ENABLED', 'Enable ICP101XX Barometric Sensor', 0, None), Feature('Sensors', 'ICP201XX', 'AP_BARO_ICP201XX_ENABLED', 'Enable ICP201XX Barometric Sensor', 0, None), @@ -278,7 +278,7 @@ BUILD_OPTIONS = [ Feature('Airspeed Drivers', 'MSP_AIRSPEED', 'AP_AIRSPEED_MSP_ENABLED', 'ENABLE MSP AIRSPEED', 0, 'AIRSPEED,MSP,OSD'), Feature('Airspeed Drivers', 'NMEA_AIRSPEED', 'AP_AIRSPEED_NMEA_ENABLED', 'ENABLE NMEA AIRSPEED', 0, 'AIRSPEED'), Feature('Airspeed Drivers', 'SDP3X', 'AP_AIRSPEED_SDP3X_ENABLED', 'ENABLE SDP3X AIRSPEED', 0, 'AIRSPEED'), - Feature('Airspeed Drivers', 'UAVCAN_ASPD', 'AP_AIRSPEED_DRONECAN_ENABLED', 'ENABLE UAVCAN AIRSPEED', 0, 'AIRSPEED'), # NOQA: E501 + Feature('Airspeed Drivers', 'DRONECAN_ASPD', 'AP_AIRSPEED_DRONECAN_ENABLED', 'ENABLE DroneCAN AIRSPEED', 0, 'AIRSPEED'), # NOQA: E501 Feature('Actuators', 'Volz', 'AP_VOLZ_ENABLED', 'Enable Volz Protocol', 0, None), Feature('Actuators', 'Volz_DroneCAN', 'AP_DRONECAN_VOLZ_FEEDBACK_ENABLED', 'Enable Volz DroneCAN Feedback', 0, None), diff --git a/Tools/scripts/decode_devid.py b/Tools/scripts/decode_devid.py index 15b574306b..4d79b9d063 100755 --- a/Tools/scripts/decode_devid.py +++ b/Tools/scripts/decode_devid.py @@ -38,7 +38,7 @@ devtype=(devid>>16) bustypes = { 1: "I2C", 2: "SPI", - 3: "UAVCAN", + 3: "DRONECAN", 4: "SITL", 5: "MSP", 6: "SERIAL", @@ -114,7 +114,7 @@ baro_types = { 0x0A : "DEVTYPE_BARO_LPS2XH", 0x0B : "DEVTYPE_BARO_MS5611", 0x0C : "DEVTYPE_BARO_SPL06", - 0x0D : "DEVTYPE_BARO_UAVCAN", + 0x0D : "DEVTYPE_BARO_DRONECAN", 0x0E : "DEVTYPE_BARO_MSP", 0x0F : "DEVTYPE_BARO_ICP101XX", 0x10 : "DEVTYPE_BARO_ICP201XX", @@ -131,7 +131,7 @@ airspeed_types = { 0x04 : "DEVTYPE_AIRSPEED_DLVR", 0x05 : "DEVTYPE_AIRSPEED_MSP", 0x06 : "DEVTYPE_AIRSPEED_SDP3X", - 0x07 : "DEVTYPE_AIRSPEED_UAVCAN", + 0x07 : "DEVTYPE_AIRSPEED_DRONECAN", 0x08 : "DEVTYPE_AIRSPEED_ANALOG", 0x09 : "DEVTYPE_AIRSPEED_NMEA", 0x0A : "DEVTYPE_AIRSPEED_ASP5033", @@ -152,7 +152,7 @@ if opts.airspeed: decoded_devname = airspeed_types.get(devtype, "UNKNOWN") if bus_type == 3: - #uavcan devtype represents sensor_id + #dronecan devtype represents sensor_id print("bus_type:%s(%u) bus:%u address:%u(0x%x) sensor_id:%u(0x%x) %s" % ( bustypes.get(bus_type,"UNKNOWN"), bus_type, bus, address, address, devtype-1, devtype-1, decoded_devname))