Skip to content

Commit 2da79a0

Browse files
follesoejp-pino
andcommitted
Add message definitions for removable storage
Co-Authored-By: Juan Pablo Pino Bravo <[email protected]>
1 parent 91fc200 commit 2da79a0

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

protobuf_definitions/message_formats.proto

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,14 +583,48 @@ message StorageSpace {
583583
int64 free_space = 2; // Available bytes of storage space (B).
584584
}
585585

586+
// Storage partition.
587+
message StoragePartition {
588+
StorageSpace storage_space = 1; // The amount of storage space on the device.
589+
string file_system_type = 2; // File system type of the removable storage device.
590+
string device_path = 3; // Partition device path
591+
string mount_path = 4; // Mount path of the partition.
592+
}
593+
594+
// Removable storage device.
595+
message RemovableStorageDevice {
596+
// Overall status of the storage device.
597+
enum Status {
598+
STATUS_UNSPECIFIED = 0; // Unspecified.
599+
STATUS_READY = 1; // The storage device is valid and ready for use.
600+
STATUS_FORMATTING = 2; // The storage device is being formatted
601+
STATUS_ERROR = 3; // The storage device is in an error state.
602+
}
603+
string vendor_name = 1; // USB vendor name.
604+
string model_name = 2; // Model name of the USB storage device.
605+
string device_path = 3; // Mount path of the storage device.
606+
Status status = 4; // Status of the storage device.
607+
RemovableStorageErrorFlags error_flags = 5; // Any active error flags for the storage device.
608+
repeated StoragePartition partitions = 6; // List of partitions on the storage device.
609+
}
610+
611+
// Error flags related to a removable storage device.
612+
message RemovableStorageErrorFlags {
613+
// Optional error message to give additional information from the drone to a client about active error flags.
614+
string error_message = 1;
615+
bool no_partitions_found = 2; // Device is attached but no partitions are found.
616+
bool multiple_partitions_found = 3; // Multiple partitions are found.
586617
bool wrong_file_system_found = 4; // The wrong file system is found.
587618
bool device_is_read_only = 5; // The device is in read-only mode.
619+
bool formatting_failed = 6; // Formatting of the device failed.
620+
}
621+
588622
// Compass calibration state.
589623
message CalibrationState {
590624

591625
// Status of the compass calibration procedure.
592626
//
593-
// When calibration is started, the status will indicate the active (upfacing) axis.
627+
// When calibration is started, the status will indicate the active (up facing) axis.
594628
enum Status
595629
{
596630
STATUS_UNSPECIFIED = 0; // Unspecified status.
@@ -602,7 +636,7 @@ message CalibrationState {
602636
STATUS_CALIBRATING_Y_NEGATIVE = 6; // Compass is calibrating and the negative Y axis is active.
603637
STATUS_CALIBRATING_Z_POSITIVE = 7; // Compass is calibrating and the positive Z axis is active.
604638
STATUS_CALIBRATING_Z_NEGATIVE = 8; // Compass is calibrating and the negative Z axis is active.
605-
STATUS_CALIBRATING_THRUSTER = 9; // Compass is calibrating for thruster interferance.
639+
STATUS_CALIBRATING_THRUSTER = 9; // Compass is calibrating for thruster interference.
606640
}
607641

608642
Status status = 1; // Current calibration status.

0 commit comments

Comments
 (0)