Skip to content

Commit

Permalink
Rename Simulator class private methods names to match snake case of o…
Browse files Browse the repository at this point in the history
…ther private class methods.
  • Loading branch information
mcsauder authored and bkueng committed Feb 28, 2019
1 parent b0a7999 commit 1eced05
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/modules/simulator/simulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,18 @@ int Simulator::start(int argc, char *argv[])
}

if (argv[2][1] == 's') {
_instance->initializeSensorData();
_instance->initialize_sensor_data();
#ifndef __PX4_QURT
// Update sensor data
_instance->pollForMAVLinkMessages(false);
_instance->poll_for_MAVLink_messages(false);
#endif

} else if (argv[2][1] == 'p') {
// Update sensor data
_instance->pollForMAVLinkMessages(true);
_instance->poll_for_MAVLink_messages(true);

} else {
_instance->initializeSensorData();
_instance->initialize_sensor_data();
_instance->_initialized = true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/modules/simulator/simulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class Simulator : public ModuleParams
}

// class methods
void initializeSensorData();
void initialize_sensor_data();

int publish_sensor_topics(mavlink_hil_sensor_t *imu);
int publish_flow_topic(mavlink_hil_optical_flow_t *flow);
Expand Down Expand Up @@ -338,7 +338,7 @@ class Simulator : public ModuleParams

void parameters_update(bool force);
void poll_topics();
void pollForMAVLinkMessages(bool publish);
void poll_for_MAVLink_messages(bool publish);
void request_hil_state_quaternion();
void send();
void send_controls();
Expand Down
4 changes: 2 additions & 2 deletions src/modules/simulator/simulator_mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ void Simulator::send_heartbeat()
send_mavlink_message(message);
}

void Simulator::initializeSensorData()
void Simulator::initialize_sensor_data()
{
// Write sensor data to memory so that drivers can copy data from there.
RawMPUData mpu = {};
Expand Down Expand Up @@ -664,7 +664,7 @@ void Simulator::initializeSensorData()
write_airspeed_data(&airspeed);
}

void Simulator::pollForMAVLinkMessages(bool publish)
void Simulator::poll_for_MAVLink_messages(bool publish)
{
#ifdef __PX4_DARWIN
pthread_setname_np("sim_rcv");
Expand Down

0 comments on commit 1eced05

Please sign in to comment.