Implement directory listing

This commit is contained in:
px4dev
2014-05-04 12:25:25 -07:00
parent 12390d7281
commit ef7c57f1ce
2 changed files with 49 additions and 12 deletions
+3 -7
View File
@@ -83,13 +83,6 @@ private:
uint8_t data[];
};
struct FileList
{
uint32_t fileSize;
uint8_t nameLength;
uint8_t name[];
};
enum Opcode : uint8_t
{
kCmdNone, // ignored, always acked
@@ -170,6 +163,9 @@ private:
};
static const uint8_t kProtocolMagic = 'f';
static const char kDirentFile = 'F';
static const char kDirentDir = 'D';
static const char kDirentUnknown = 'U';
static const uint8_t kMaxDataLength = MAVLINK_MSG_ENCAPSULATED_DATA_FIELD_DATA_LEN - sizeof(RequestHeader);
/// Request worker; runs on the low-priority work queue to service