mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
pwm_out_sim, simulator_mavlink: fixed code style
Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
parent
10bf6a4b59
commit
2549b702f0
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user