Tools: text messages and more defines

This commit is contained in:
Andrew Tridgell 2023-04-08 14:27:51 +10:00
parent 6b268173dd
commit 402de293d6
6 changed files with 13 additions and 21 deletions

View File

@ -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,

View File

@ -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',

View File

@ -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

View File

@ -97,7 +97,7 @@ The software and hardware we provide is only for use in unmanned
<a href="http://github.com/ArduPilot/companion"><img src="images/companion.png" width="78"
alt="Companion">Companion</a> - Companion Computer example code <a href="Companion">and Images</a></p><p>
<a href="AP_Periph"><img src="images/tools.png" width="80"
alt="AP_Periph">AP_Periph</a> - UAVCAN Peripheral Firmware<p>
alt="AP_Periph">AP_Periph</a> - DroneCAN Peripheral Firmware<p>
<a href="Tools/FilterTool"><img src="images/filter.png" width="80"
alt="FilterTool">FilterTool</a> - Filter Analysis Tool<p>

View File

@ -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),

View File

@ -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))