Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak of source code after fork #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ DroneCAN DSDL definitions
This repository contains the DSDL definitions of the standard DroneCAN
messages and services.

This DSDL is based on UAVCAN-v0
This DSDL is originally based on UAVCAN-v0, but was forked Oct 2021.

* [**DroneCAN website**](http://dronecan.org)
4 changes: 2 additions & 2 deletions ardupilot/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
This directory contains the DSDL for the ArduPilot vendor specific
UAVCAN messages.
DroneCAN messages.

For service messages we use IDs starting at 200

For non-service messages we use IDs starting at 20000

https://uavcan.org/Specification/5._Application_level_conventions/#id-distribution
https://dronecan.org/Specification/5._Application_level_conventions/#id-distribution
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#
# Auxilary Single battery info.
#
# This message is to be used in conjunction with uavcan/equipment/power/1092.BatteryInfo.uavcan
# This message is to be used in conjunction with dronecan/equipment/power/1092.BatteryInfo.dronecan

# Please ensure that this message is sent before the BatteryInfo which doesn't
# include the timestamp. The following fields should contain the timestamp of the last current measurement.
uavcan.Timestamp timestamp
dronecan.Timestamp timestamp

# Battery individual cell voltages
# length of following field also used as cell count
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Network-synchronized timestamp, 0 if not available. Note: not necessarily a UTC time.
uavcan.Timestamp timestamp
dronecan.Timestamp timestamp

# icao address
uint32 icao_address
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# timestamp on the gps message
uavcan.Timestamp timestamp
dronecan.Timestamp timestamp

bool reported_heading_acc_available
float32 reported_heading_deg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# support for Safety LED on UAVCAN
# support for Safety LED on DroneCAN

uint8 STATUS_SAFETY_ON = 0
uint8 STATUS_SAFETY_OFF = 255
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# support for buttons on UAVCAN
# support for buttons on DroneCAN
# while a button is being pressed this message should be sent at 10Hz

uint8 BUTTON_SAFETY = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# support for CUAV Smart Battery on UAVCAN
# support for CUAV Smart Battery on DroneCAN
#

float32 temperature # The surface temperature of the battery
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions uavcan/README.md → dronecan/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
UAVCAN namespace
DroneCAN namespace
================

For details, please refer to the [UAVCAN specification](http://uavcan.org/).
For details, please refer to the [DroneCAN specification](http://dronecan.org/).

## Standard ID grouping

Expand Down
2 changes: 1 addition & 1 deletion uavcan/Timestamp.uavcan → dronecan/Timestamp.dronecan
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Global timestamp in microseconds, 7 bytes.
#
# Use this data type for timestamp fields in messages, like follows:
# uavcan.Timestamp timestamp
# dronecan.Timestamp timestamp
#

uint56 UNKNOWN = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Inertial data and orientation in body frame.
#

uavcan.Timestamp timestamp
dronecan.Timestamp timestamp

#
# Normalized quaternion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Magnetic field readings, in Gauss, in body frame.
# SI units are avoided because of float16 range limitations.
# This message is deprecated. Use the newer 1002.MagneticFieldStrength2.uavcan message.
# This message is deprecated. Use the newer 1002.MagneticFieldStrength2.dronecan message.
#

float16[3] magnetic_field_ga
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# Data acquisition timestamp in the bus shared time base.
#
uavcan.Timestamp timestamp
dronecan.Timestamp timestamp

#
# Integration interval, seconds.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Mode mode

#
# Camera axis orientation in body frame (not in fixed frame).
# Please refer to the UAVCAN coordinate frame conventions.
# Please refer to the DroneCAN coordinate frame conventions.
#
float16[4] camera_orientation_in_body_frame_xyzw
float16[<=9] camera_orientation_in_body_frame_covariance # +inf for non-existent axes
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#
# GNSS navigation solution with uncertainty.
# This message is deprecated. Use the newer 1063.Fix2.uavcan message.
# This message is deprecated. Use the newer 1063.Fix2.dronecan message.
#

uavcan.Timestamp timestamp # Global network-synchronized time, if available, otherwise zero
dronecan.Timestamp timestamp # Global network-synchronized time, if available, otherwise zero

#
# Time solution.
# Time standard (GPS, UTC, TAI, etc) is defined in the field below.
#
uavcan.Timestamp gnss_timestamp
dronecan.Timestamp gnss_timestamp

#
# Time standard used in the GNSS timestamp field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
#
# Global network-synchronized time, if available, otherwise zero.
#
uavcan.Timestamp timestamp
dronecan.Timestamp timestamp

#
# Time solution.
# The method and number of leap seconds which were in use for deriving the timestamp are
# defined in the fields below.
#
uavcan.Timestamp gnss_timestamp
dronecan.Timestamp gnss_timestamp

#
# Method used for deriving the GNSS timestamp field.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# Generic narrow-beam range sensor data.
#

uavcan.Timestamp timestamp
dronecan.Timestamp timestamp

uint8 sensor_id

uavcan.CoarseOrientation beam_orientation_in_body_frame
dronecan.CoarseOrientation beam_orientation_in_body_frame

float16 field_of_view # Radians

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Global network synchronized timestamp, if known.
# Set to zero if the timestamp is not known.
#
uavcan.Timestamp timestamp
dronecan.Timestamp timestamp

#
# Geo location [angular degree].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
uint16 id # Ignored if 'name' is non-empty
DataTypeKind kind # Ignored if 'name' is non-empty

uint8[<=80] name # Full data type name, e.g. "uavcan.protocol.GetDataTypeInfo"
uint8[<=80] name # Full data type name, e.g. "dronecan.protocol.GetDataTypeInfo"

---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Abstract node status information.
#
# All UAVCAN nodes are required to publish this message periodically.
# All DroneCAN nodes are required to publish this message periodically.
#

#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
---

#
# UAVCAN transport layer statistics.
# DroneCAN transport layer statistics.
#
uint48 transfers_tx # Number of transmitted transfers.
uint48 transfers_rx # Number of received transfers.
uint48 transfer_errors # Number of errors detected in the UAVCAN transport layer.
uint48 transfer_errors # Number of errors detected in the DroneCAN transport layer.

#
# CAN bus statistics, for each interface independently.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ void6
#
# This field is unused; keep it empty
#
uavcan.protocol.param.NumericValue value
dronecan.protocol.param.NumericValue value

#
# Name of the enumerated parameter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# If the slave node accepts this request, the initiator will get a response immediately, before the update process
# actually begins.
#
# While the firmware is being updated, the slave should set its mode (uavcan.protocol.NodeStatus.mode) to
# While the firmware is being updated, the slave should set its mode (dronecan.protocol.NodeStatus.mode) to
# MODE_SOFTWARE_UPDATE.
#

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

logging.basicConfig(stream=sys.stderr, level='DEBUG', format='%(levelname)s: %(message)s')

from uavcan import dsdl
from dronecan import dsdl

parsed = dsdl.parse_namespaces(['uavcan','com','ardupilot']);
parsed = dsdl.parse_namespaces(['dronecan','com','ardupilot']);
if parsed:
logging.info('%d data types parsed successfully', len(parsed))