update according to pull request review comments

This commit is contained in:
Bob-F
2018-07-28 18:55:08 -07:00
committed by Beat Küng
parent 7c62fe885d
commit 627ea3b23e
8 changed files with 19 additions and 28 deletions
+1 -9
View File
@@ -1150,12 +1150,8 @@ Mavlink::find_broadcast_address()
const struct in_addr netmask_addr = query_netmask_addr(_socket_fd, *cur_ifreq);
const struct in_addr broadcast_addr = compute_broadcast_addr(sin_addr, netmask_addr);
#ifdef __PX4_POSIX_BBBLUE
if (strstr(cur_ifreq->ifr_name, _mavlink_wifi_name) == NULL) { continue; }
#endif
PX4_INFO("using network interface %s, IP: %s", cur_ifreq->ifr_name, inet_ntoa(sin_addr));
PX4_INFO("with netmask: %s", inet_ntoa(netmask_addr));
PX4_INFO("and broadcast IP: %s", inet_ntoa(broadcast_addr));
@@ -1951,9 +1947,7 @@ Mavlink::task_main(int argc, char *argv[])
_mode = MAVLINK_MODE_NORMAL;
bool _force_flow_control = false;
#ifdef __PX4_POSIX_BBBLUE
_mavlink_wifi_name = __PX4_BBBLUE_DEFAULT_MAVLINK_WIFI;
#endif
_mavlink_wifi_name = __DEFAULT_MAVLINK_WIFI;
#ifdef __PX4_NUTTX
/* the NuttX optarg handler does not
@@ -2004,9 +1998,7 @@ Mavlink::task_main(int argc, char *argv[])
break;
case 'n':
#ifdef __PX4_POSIX_BBBLUE
_mavlink_wifi_name = myoptarg;
#endif
break;
#ifdef __PX4_POSIX
+2 -6
View File
@@ -63,10 +63,8 @@
#include <net/if.h>
#endif
#ifdef __PX4_POSIX_BBBLUE
#ifndef __PX4_BBBLUE_DEFAULT_MAVLINK_WIFI
#define __PX4_BBBLUE_DEFAULT_MAVLINK_WIFI "SoftAp"
#endif
#ifndef __DEFAULT_MAVLINK_WIFI
#define __DEFAULT_MAVLINK_WIFI "wlan"
#endif
#include <uORB/uORB.h>
@@ -608,9 +606,7 @@ private:
unsigned _network_buf_len;
#endif
#ifdef __PX4_POSIX_BBBLUE
const char *_mavlink_wifi_name;
#endif
int _socket_fd;
Protocol _protocol;
+1 -1
View File
@@ -98,7 +98,7 @@ PARAM_DEFINE_FLOAT(BAT_A_PER_V, -1.0);
* means that measurements are expected to come from a power module. If the value is set to
* 'External' then the system expects to receive mavlink battery status messages.
*
* @min -1
* @min 0
* @max 1
* @value 0 Power Module
* @value 1 External
@@ -626,7 +626,6 @@ void VotedSensorsUpdate::accel_poll(struct sensor_combined_s &raw)
// write the best sensor data to the output variables
if (best_index >= 0) {
raw.timestamp = _last_sensor_data[best_index].timestamp;
raw.accelerometer_integral_dt = _last_sensor_data[best_index].accelerometer_integral_dt;
memcpy(&raw.accelerometer_m_s2, &_last_sensor_data[best_index].accelerometer_m_s2, sizeof(raw.accelerometer_m_s2));