Browse Source

Rover: tighten return types of mavlink functions and variables

mission-4.1.18
Peter Barker 7 years ago committed by Francisco Ferreira
parent
commit
1d2ec9054b
  1. 4
      APMrover2/GCS_Mavlink.cpp
  2. 2
      APMrover2/Rover.h
  3. 2
      APMrover2/motor_test.cpp

4
APMrover2/GCS_Mavlink.cpp

@ -655,7 +655,7 @@ void GCS_MAVLINK_Rover::handleMessage(mavlink_message_t* msg) @@ -655,7 +655,7 @@ void GCS_MAVLINK_Rover::handleMessage(mavlink_message_t* msg)
// decode packet
mavlink_command_int_t packet;
mavlink_msg_command_int_decode(msg, &packet);
uint8_t result = MAV_RESULT_UNSUPPORTED;
MAV_RESULT result = MAV_RESULT_UNSUPPORTED;
switch (packet.command) {
@ -749,7 +749,7 @@ void GCS_MAVLINK_Rover::handleMessage(mavlink_message_t* msg) @@ -749,7 +749,7 @@ void GCS_MAVLINK_Rover::handleMessage(mavlink_message_t* msg)
mavlink_command_long_t packet;
mavlink_msg_command_long_decode(msg, &packet);
uint8_t result = MAV_RESULT_UNSUPPORTED;
MAV_RESULT result = MAV_RESULT_UNSUPPORTED;
// do command

2
APMrover2/Rover.h

@ -587,7 +587,7 @@ public: @@ -587,7 +587,7 @@ public:
// Motor test
void motor_test_output();
bool mavlink_motor_test_check(mavlink_channel_t chan, bool check_rc, uint8_t motor_seq, uint8_t throttle_type, int16_t throttle_value);
uint8_t mavlink_motor_test_start(mavlink_channel_t chan, uint8_t motor_seq, uint8_t throttle_type, int16_t throttle_value, float timeout_sec);
MAV_RESULT mavlink_motor_test_start(mavlink_channel_t chan, uint8_t motor_seq, uint8_t throttle_type, int16_t throttle_value, float timeout_sec);
void motor_test_stop();
};

2
APMrover2/motor_test.cpp

@ -110,7 +110,7 @@ bool Rover::mavlink_motor_test_check(mavlink_channel_t chan, bool check_rc, uint @@ -110,7 +110,7 @@ bool Rover::mavlink_motor_test_check(mavlink_channel_t chan, bool check_rc, uint
// mavlink_motor_test_start - start motor test - spin a single motor at a specified pwm
// returns MAV_RESULT_ACCEPTED on success, MAV_RESULT_FAILED on failure
uint8_t Rover::mavlink_motor_test_start(mavlink_channel_t chan, uint8_t motor_seq, uint8_t throttle_type, int16_t throttle_value, float timeout_sec)
MAV_RESULT Rover::mavlink_motor_test_start(mavlink_channel_t chan, uint8_t motor_seq, uint8_t throttle_type, int16_t throttle_value, float timeout_sec)
{
// if test has not started try to start it
if (!motor_test) {

Loading…
Cancel
Save