Skip to content

Commit 5739a6a

Browse files
authored
Merge pull request #207 from BluEye-Robotics/removable-storage
Add message definitions for removable storage device
2 parents 3e0ba70 + 2da79a0 commit 5739a6a

File tree

3 files changed

+54
-3
lines changed

3 files changed

+54
-3
lines changed

protobuf_definitions/control.proto

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,12 @@ message StartDiveCtrl {
215215
// at which point the user exited the dive view.
216216
message EndDiveCtrl {
217217
}
218+
219+
// Message sent when the user wants to format a connected removable storage device.
220+
//
221+
// The app will receive a RemovableStorageTel message with information about the newly formatted drive.
222+
//
223+
// Warning: The drone will delete any partitions and format the drive with a single exFat partition.
224+
// Any data on the drive will be lost.
225+
message FormatRemovableStorageDeviceCtrl {
226+
}

protobuf_definitions/message_formats.proto

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,12 +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.
617+
bool wrong_file_system_found = 4; // The wrong file system is found.
618+
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+
586622
// Compass calibration state.
587623
message CalibrationState {
588624

589625
// Status of the compass calibration procedure.
590626
//
591-
// 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.
592628
enum Status
593629
{
594630
STATUS_UNSPECIFIED = 0; // Unspecified status.
@@ -600,7 +636,7 @@ message CalibrationState {
600636
STATUS_CALIBRATING_Y_NEGATIVE = 6; // Compass is calibrating and the negative Y axis is active.
601637
STATUS_CALIBRATING_Z_POSITIVE = 7; // Compass is calibrating and the positive Z axis is active.
602638
STATUS_CALIBRATING_Z_NEGATIVE = 8; // Compass is calibrating and the negative Z axis is active.
603-
STATUS_CALIBRATING_THRUSTER = 9; // Compass is calibrating for thruster interferance.
639+
STATUS_CALIBRATING_THRUSTER = 9; // Compass is calibrating for thruster interference.
604640
}
605641

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

protobuf_definitions/telemetry.proto

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,13 @@ message CanisterBottomHumidityTel {
148148

149149
// Video storage info.
150150
message VideoStorageSpaceTel {
151-
StorageSpace storage_space = 1; // Video storage information.
151+
StorageSpace storage_space = 1; // Internal Video storage information.
152+
StorageSpace removable_space = 2; // Removable Video storage information. Can be empty.
153+
}
154+
155+
// Information about removable storage device.
156+
message RemovableStorageTel {
157+
RemovableStorageDevice storage_device = 1; // Information about the storage device (such as partitions)
152158
}
153159

154160
// Data storage info.

0 commit comments

Comments
 (0)