-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit. Ensure that the DroneCAN esc module can receive the S…
…tatusExtended message Initial working logging of the extended ESC status message of one motor update DroneCAN extended status message to have multiple entries add messages and start process of logging dronecan node status information working node status logging cleanup last bits of cleanup. Get rid of magic numbers and variable names update logic for adding to node status run formatting on uavcan esc final updates. Update naming to be consistent with esc status extended. update node status logging with appropriate names update comments fix name of dronecan_esc_status_extended in logged topics
- Loading branch information
1 parent
9d33f8f
commit 2595534
Showing
9 changed files
with
192 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
uint8 CONNECTED_ESC_MAX = 8 # The number of ESCs supported. To be consistent with ESC Status, limit it to 8. | ||
|
||
DronecanEscStatusExtendedData[8] extended_esc_status_data # An array of up to CONNECTED_ESC_MAX DronecanEscStatusExtendedData instances |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
# From the StatusExtended.uavcan message | ||
uint8 input_percent # Input command to ESC, in percent, which is commanded using the setpoint messages. Range 0% to 100%. | ||
uint8 output_percent # Output command from ESC to motor, in percent. Range 0% to 100%. | ||
int16 motor_temperature_deg_c # Temperature of connected motor, in Celsius. Range is -256 to +255 C. | ||
uint16 motor_angle # Measured angle of connected angle sensor, in degrees. Range is 0 to 360. | ||
uint32 status_flags # Manufacturer-specific status flags currently active. | ||
uint8 esc_index # Index of currently reporting ESC. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
uint8 MAX_NODE_STATUSES_LOGGED = 8 # Hold up to 8 nodes worth of Node Status data in the logs. Limited to 8 to avoid needlessly large log files. | ||
|
||
DronecanNodeStatusData[8] node_status_id # An array of up to MAX_NODE_STATUSES_LOGGED DronecanNodeStatusData instances |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
# From the uavcan.protocol.NodeStatus message | ||
uint32 uptime_sec # Node uptime | ||
|
||
uint16 node_id # The node ID which this data comes from | ||
|
||
# | ||
# Abstract node health. | ||
# | ||
uint8 HEALTH_OK = 0 # The node is functioning properly. | ||
uint8 HEALTH_WARNING = 1 # A critical parameter went out of range or the node encountered a minor failure. | ||
uint8 HEALTH_ERROR = 2 # The node encountered a major failure. | ||
uint8 HEALTH_CRITICAL = 3 # The node suffered a fatal malfunction. | ||
uint8 health | ||
|
||
# | ||
# Current mode. | ||
# | ||
# Mode OFFLINE can be actually reported by the node to explicitly inform other network | ||
# participants that the sending node is about to shutdown. In this case other nodes will not | ||
# have to wait OFFLINE_TIMEOUT_MS before they detect that the node is no longer available. | ||
# | ||
# Reserved values can be used in future revisions of the specification. | ||
# | ||
uint8 MODE_OPERATIONAL = 0 # Normal operating mode. | ||
uint8 MODE_INITIALIZATION = 1 # Initialization is in progress; this mode is entered immediately after startup. | ||
uint8 MODE_MAINTENANCE = 2 # E.g. calibration, the bootloader is running, etc. | ||
uint8 MODE_SOFTWARE_UPDATE = 3 # New software/firmware is being loaded. | ||
uint8 MODE_OFFLINE = 7 # The node is no longer available. | ||
uint8 mode | ||
|
||
# | ||
# Not used currently, keep zero when publishing, ignore when receiving. | ||
# | ||
uint8 sub_mode | ||
|
||
# | ||
# Optional, vendor-specific node status code, e.g. a fault code or a status bitmask. | ||
# | ||
uint16 vendor_specific_status_code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters