Skip to content

Commit

Permalink
plugin: ftp: Disable debugging and change level for some log messages.
Browse files Browse the repository at this point in the history
Issue #128.
  • Loading branch information
vooon committed Sep 22, 2014
1 parent 4cabd34 commit d9c987c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions mavros/src/plugins/ftp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include <mavros/FileChecksum.h>

// enable debugging messages
#define FTP_LL_DEBUG
//#define FTP_LL_DEBUG

namespace mavplugin {

Expand Down Expand Up @@ -474,7 +474,7 @@ class FTPPlugin : public MavRosPlugin {
ROS_ASSERT(hdr->size == sizeof(uint32_t));
open_size = *req.data_u32();

ROS_DEBUG_NAMED("ftp", "FTP:Open %s: success, session %u, size %zu",
ROS_INFO_NAMED("ftp", "FTP:Open %s: success, session %u, size %zu",
open_path.c_str(), hdr->session, open_size);
session_file_map.insert(std::make_pair(open_path, hdr->session));
go_idle(false);
Expand Down Expand Up @@ -676,8 +676,6 @@ class FTPPlugin : public MavRosPlugin {
send_any_path_command(FTPRequest::kCmdCalcFileCRC32, "kCmdCalcFileCRC32: ", path, 0);
}

/* how to open existing file to write? */

/* -*- helpers -*- */

void add_dirent(const char *ptr, size_t slen) {
Expand Down
2 changes: 1 addition & 1 deletion mavros/srv/FileChecksum.srv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FTP:Checksum
# FTP::Checksum
#
# :file_path: file to calculate checksum
# :crc32: file checksum
Expand Down
8 changes: 2 additions & 6 deletions mavros/srv/FileOpen.srv
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# FTP::Open
#
# :file_path: used as session id in all other services
# :file_path: used as session id in read/write/close services
# :size: file size returned for MODE_READ
# :success: indicates success end of request
# :r_errno: remote errno if applicapable

# 2014.09.01 Notes:
# Current PX4 implementation don't allow anything except
# read file or list dir.

uint8 MODE_READ = 0 # open for read
uint8 MODE_WRITE = 1 # open for write (not supported)
uint8 MODE_WRITE = 1 # open for write
uint8 MODE_CREATE = 2 # do creat()

string file_path
Expand Down
2 changes: 1 addition & 1 deletion mavros/srv/FileRename.srv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FTP:Rename
# FTP::Rename
#
# :success: indicates success end of request
# :r_errno: remote errno if applicapable
Expand Down

0 comments on commit d9c987c

Please sign in to comment.