Commit Graph

39 Commits

Author SHA1 Message Date
Beat Küng 5b85b26351 mavlink_ftp: keep a copy of the last reply & resend it upon duplicated seq num 2017-09-21 07:33:09 +02:00
Beat Küng b072599679 mavlink_ftp: fix alignment issue 2017-09-21 07:33:09 +02:00
Beat Küng ea587d585f mavlink_ftp: add & handle kErrFailFileExists error
This error definitions already existed in QGC
2017-09-21 07:33:09 +02:00
Beat Küng a6c682ce50 mavlink_ftp: fix stack overflow & add root dir prefix
- change memory allocation from stack to a malloc'd buffer. This avoids
  increasing the stack size. And since FTP is rarely used, the buffers
  are only allocated upon use and freed after a time of 2s inactivity.
- adds PX4_ROOTFSDIR as root directory prefix. This does not change
  anything on NuttX, but in SITL it will avoid enumerating the whole
  disk tree when using QGC (which enumerates all files recursively).
2017-07-21 19:59:45 +02:00
Beat Küng e6c3b29aa6 MavlinkFTP: remove MavlinkStream inheritance 2017-05-18 09:48:14 +02:00
Julian Oes 8ddda0a8fa mavlink: move the msg id from uint8_t to uint16_t
With mavlink2 new messages are added with msg IDs greated than 255.
Therefore the msg ID types needed to be raised everywhere.
2016-11-09 10:23:34 +01:00
Lorenz Meier 720c445f21 MAVLink: Code style 2016-08-26 23:43:33 +02:00
Lorenz Meier 6ab9dc0acf Testing cleanup from Daniel Agar 2016-07-29 13:49:14 +02:00
Lorenz Meier 3e0c14dea2 MAVLink FTP: Do not list hidden directories by default 2015-06-06 11:35:29 +02:00
Lorenz Meier 97b8e7a20e mavlink FTP: Speed up transfers by longer bursts 2015-05-15 21:14:40 +02:00
Don Gagne 46da294ffb New bust mode ftp file download 2015-05-03 19:26:54 -07:00
Daniel Agar d511e39ea7 turn on -Werror and fix resulting errors 2014-12-22 17:56:59 -05:00
Vladimir Ermakov ef5a93c09c FTP: Add file checksum calculation command. 2014-09-22 15:19:38 +04:00
Vladimir Ermakov 8eb3100616 FTP: Rename command.
Payload: `<oldpath>\0<newpath>`
See: man 2 rename
2014-09-22 13:48:43 +04:00
Vladimir Ermakov f55d20a133 FTP: Add truncate command.
Unfortunately NuttX not provides truncate(),
had to be emulated by copying with O_TRUNC flag.
2014-09-17 18:42:00 +04:00
Vladimir Ermakov 60c63f4872 FTP: Add new open command for write.
All open commands now return file size.
2014-09-17 10:07:29 +04:00
Vladimir Ermakov 006717734c FTP: Add skip entry information for proper offset calculation. 2014-09-15 21:29:19 +04:00
Don Gagne 981741f8ce Don't send back U or ./.. entries from List command 2014-09-10 13:11:36 -07:00
Vladimir Ermakov 745707d193 FTP: remove reserved uint32 from header. 2014-09-10 11:22:03 +04:00
Vladimir Ermakov 0d2e250d11 FTP: Remove CRC32 from protocol.
Extra crc not needed because mavlink already has crc16.
2014-09-09 17:36:41 +04:00
Vladimir Ermakov e7ae13a58e FTP: Make responses start from opcode 128. 2014-09-09 17:17:11 +04:00
Vladimir Ermakov 564c9b7b60 FTP: Add req_opcode field for return request opcode in response message. 2014-09-09 17:02:25 +04:00
Don Gagne 828fb5efd1 Additional FTP command support plus unit test
- Restructured to a flatter class implementation
- Added support for create/remove directory, remove file
- Refactored error codes and command opcodes
- Added unit test support
- Fixed bugs found by unit test
2014-09-02 15:36:32 -07:00
Don Gagne fce0a3b728 Gave up on using bitfields 2014-08-27 21:39:55 -07:00
Don Gagne 0eea110f6f Modified to use new FILE_TRANSFER_PROTOCOL message
- Also corrected system/component id transmit/check
2014-08-27 17:14:49 -07:00
Don Gagne c8ecf59ab7 List command bug fix, easier debugging
- List command was generating bad data size because it was adding
directory entry char to buffer before testing buffer overflow.
- Added MAVLINK_FTP_DEBUG define to easily turn on/off noisier
debugging output
2014-08-12 14:23:26 -07:00
Don Gagne 1d3edfa629 More FTP support
Added:
- sequence numbers
- directory list returns file sizes
- open command returns file size in data
2014-08-10 12:02:10 -07:00
Anton Babushkin a5f2d1b066 mavlink: new message sending API, includes fixed 2014-07-23 11:11:49 +02:00
Lorenz Meier 9f1661f1f8 Silence FTP transactions, be vocal about errors 2014-07-08 09:58:08 +02:00
Don Gagne f3af2f9f62 Fix tabbing to 8 spaces, keep tab 2014-06-29 13:47:56 -07:00
Don Gagne a398d5cbcc Support for List, Open, Read, Terminate commands
Fixed various bugs. Flattened Mavlink::Session class while fixing bugs
in this area.
2014-06-27 20:33:39 -07:00
Lorenz Meier f9db1723e3 mavlink-ftp: Remove commented out code 2014-06-26 14:20:29 +02:00
Lorenz Meier 1a0f53ec3a mavlink-ftp: Remove two extra bytes we don not need 2014-06-26 13:50:46 +02:00
Lorenz Meier a103fef948 Fixed threading and transmission issues for FTP 2014-06-08 18:51:35 +02:00
px4dev e890661900 Don't queue empty work items. 2014-06-07 14:46:46 -07:00
px4dev 99dfef357b fix extraction of path info from FTP request 2014-06-07 12:54:04 -07:00
Lorenz Meier 6351fd1e2c Added debug printfs 2014-05-05 13:48:05 +02:00
px4dev ef7c57f1ce Implement directory listing 2014-05-04 12:25:25 -07:00
px4dev 12390d7281 WIP: Mavlink file server 2014-05-04 11:19:26 -07:00