Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
530cb4c2
Commit
530cb4c2
authored
Sep 09, 2014
by
Vladimir Ermakov
Browse files
FTP: Update RequestHeader struct and Opcode enum
parent
fbea1b6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/uas/QGCUASFileManager.cc
View file @
530cb4c2
...
...
@@ -97,7 +97,6 @@ quint32 QGCUASFileManager::crc32(Request* request, unsigned state)
request
->
hdr
.
crc32
=
0
;
request
->
hdr
.
padding
[
0
]
=
0
;
request
->
hdr
.
padding
[
1
]
=
0
;
request
->
hdr
.
padding
[
2
]
=
0
;
for
(
size_t
i
=
0
;
i
<
cbData
;
i
++
)
state
=
crctab
[(
state
^
data
[
i
])
&
0xff
]
^
(
state
>>
8
);
...
...
src/uas/QGCUASFileManager.h
View file @
530cb4c2
...
...
@@ -83,7 +83,8 @@ protected:
uint8_t
session
;
///< Session id for read and write commands
uint8_t
opcode
;
///< Command opcode
uint8_t
size
;
///< Size of data
uint8_t
padding
[
3
];
uint8_t
req_opcode
;
///< Request opcode returned in kRspAck, kRspNak message
uint8_t
padding
[
2
];
uint32_t
crc32
;
///< CRC for entire Request structure, with crc32 and padding set to 0
uint32_t
offset
;
///< Offsets for List and Read commands
};
...
...
@@ -117,7 +118,7 @@ protected:
kCmdCreateDirectory
,
///< Creates directory at <path>
kCmdRemoveDirectory
,
///< Removes Directory at <path>, must be empty
kRspAck
,
///< Ack response
kRspAck
=
128
,
///< Ack response
kRspNak
,
///< Nak response
// Used for testing only, not part of protocol
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment