Skip to content
Snippets Groups Projects
Commit 2549b702 authored by Roman's avatar Roman Committed by Daniel Agar
Browse files

pwm_out_sim, simulator_mavlink: fixed code style


Signed-off-by: default avatarRoman <bapstroman@gmail.com>
parent 10bf6a4b
No related branches found
No related tags found
No related merge requests found
......@@ -196,7 +196,7 @@ PWMSim::PWMSim() :
{
memset(_controls, 0, sizeof(_controls));
for(unsigned i = 0; i < _max_actuators; i++) {
for (unsigned i = 0; i < _max_actuators; i++) {
_pwm_min[i] = PWM_SIM_PWM_MIN_MAGIC;
_pwm_max[i] = PWM_SIM_PWM_MAX_MAGIC;
}
......@@ -641,21 +641,27 @@ PWMSim::pwm_ioctl(device::file_t *filp, int cmd, unsigned long arg)
case PWM_SERVO_SET_MIN_PWM: {
struct pwm_output_values *pwm = (struct pwm_output_values *)arg;
for(unsigned i = 0; i < pwm->channel_count; i++) {
if (i <= _max_actuators)
for (unsigned i = 0; i < pwm->channel_count; i++) {
if (i <= _max_actuators) {
_pwm_min[i] = pwm->values[i];
}
}
break;
}
case PWM_SERVO_SET_MAX_PWM: {
struct pwm_output_values *pwm = (struct pwm_output_values *)arg;
for(unsigned i = 0; i < pwm->channel_count; i++) {
if (i <= _max_actuators)
for (unsigned i = 0; i < pwm->channel_count; i++) {
if (i <= _max_actuators) {
_pwm_max[i] = pwm->values[i];
}
}
break;
}
......
......@@ -102,7 +102,7 @@ void Simulator::pack_actuator_message(mavlink_hil_actuator_controls_t &msg, unsi
unsigned n;
switch (_system_type) {
case MAV_TYPE_VTOL_DUOROTOR:
case MAV_TYPE_VTOL_DUOROTOR:
n = 2;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment