camelcase function name, initialize c++11 style

This commit is contained in:
baumanta 2019-05-16 16:34:52 +02:00 committed by Mathieu Bresciani
parent e7d17cc265
commit 33cd032c35
2 changed files with 7 additions and 7 deletions

View File

@ -65,7 +65,7 @@ bool CollisionPrevention::initializeSubscriptions(SubscriptionArray &subscriptio
return true;
}
void CollisionPrevention::calculate_constrained_setpoint(Vector2f &setpoint, const float max_acc, const float curr_vel)
void CollisionPrevention::calculateConstrainedSetpoint(Vector2f &setpoint, const float max_acc, const float curr_vel)
{
const obstacle_distance_s &obstacle_distance = _sub_obstacle_distance->get();
@ -148,7 +148,7 @@ void CollisionPrevention::modifySetpoint(Vector2f &original_setpoint, const floa
{
//calculate movement constraints based on range data
Vector2f new_setpoint = original_setpoint;
calculate_constrained_setpoint(new_setpoint, max_acc, curr_vel);
calculateConstrainedSetpoint(new_setpoint, max_acc, curr_vel);
//warn user if collision prevention starts to interfere
bool currently_interfering = (new_setpoint(0) < original_setpoint(0) - 0.05f * max_speed

View File

@ -73,16 +73,16 @@ public:
private:
bool _interfering = false; /**< states if the collision prevention interferes with the user input */
bool _interfering{false}; /**< states if the collision prevention interferes with the user input */
orb_advert_t _mavlink_log_pub{nullptr}; /**< Mavlink log uORB handle */
uORB::SubscriptionPollable<obstacle_distance_s> *_sub_obstacle_distance{nullptr}; /**< obstacle distances received form a range sensor */
static constexpr uint64_t RANGE_STREAM_TIMEOUT_US = 500000;
static constexpr uint64_t MESSAGE_THROTTLE_US = 5000000;
static constexpr uint64_t RANGE_STREAM_TIMEOUT_US{500000};
static constexpr uint64_t MESSAGE_THROTTLE_US{5000000};
hrt_abstime _last_message;
hrt_abstime _last_message{0};
DEFINE_PARAMETERS(
(ParamFloat<px4::params::MPC_COL_PREV_D>) _param_mpc_col_prev_d, /**< collision prevention keep minimum distance */
@ -91,6 +91,6 @@ private:
void update();
void calculate_constrained_setpoint(matrix::Vector2f &setpoint, const float max_acc, const float curr_vel);
void calculateConstrainedSetpoint(matrix::Vector2f &setpoint, const float max_acc, const float curr_vel);
};