stm32 : formatting

This commit is contained in:
Mohammed Kabir
2017-04-12 11:35:09 +02:00
committed by Lorenz Meier
parent f9862ec5a8
commit 0a5ada9e02
2 changed files with 12 additions and 5 deletions
+2 -2
View File
@@ -732,7 +732,7 @@ PX4FMU::set_pwm_rate(uint32_t rate_map, unsigned default_rate, unsigned alt_rate
* rate and mode. (See rates above.)
*/
for (unsigned group = 0; group < _max_actuators; group++) { // TODO : make sure this doesn't touch trigger
for (unsigned group = 0; group < _max_actuators; group++) {
// get the channel mask for this rate group
uint32_t mask = up_pwm_servo_get_rate_group(group);
@@ -1251,7 +1251,7 @@ PX4FMU::cycle()
/* do mixing */
float outputs[_max_actuators];
_num_outputs = _mixers->mix(outputs, _num_outputs, NULL); // TODO : what
_num_outputs = _mixers->mix(outputs, _num_outputs, NULL);
/* publish mixer status */
multirotor_motor_limits_s multirotor_motor_limits = {};
+10 -3
View File
@@ -790,7 +790,10 @@ int io_timer_set_enable(bool state, io_timer_channel_mode_t mode, io_timer_chann
action_cache[timer].dier_clearbits |= GTIM_DIER_CC1IE << shifts;
action_cache[timer].dier_setbits |= dier_bit << shifts;
if ((state && (mode == IOTimerChanMode_PWMOut || mode == IOTimerChanMode_OneShot || mode == IOTimerChanMode_Trigger))) {
if ((state &&
(mode == IOTimerChanMode_PWMOut ||
mode == IOTimerChanMode_OneShot ||
mode == IOTimerChanMode_Trigger))) {
action_cache[timer].gpio[shifts] = timer_io_channels[chan_index].gpio_out;
}
}
@@ -847,7 +850,9 @@ int io_timer_set_ccr(unsigned channel, uint16_t value)
int mode = io_timer_get_channel_mode(channel);
if (rv == 0) {
if ((mode != IOTimerChanMode_PWMOut) && (mode != IOTimerChanMode_OneShot) && (mode != IOTimerChanMode_Trigger)) {
if ((mode != IOTimerChanMode_PWMOut) &&
(mode != IOTimerChanMode_OneShot) &&
(mode != IOTimerChanMode_Trigger)) {
rv = -EIO;
@@ -869,7 +874,9 @@ uint16_t io_channel_get_ccr(unsigned channel)
if (io_timer_validate_channel_index(channel) == 0) {
int mode = io_timer_get_channel_mode(channel);
if ((mode == IOTimerChanMode_PWMOut) || (mode == IOTimerChanMode_OneShot) || (mode == IOTimerChanMode_Trigger)) {
if ((mode == IOTimerChanMode_PWMOut) ||
(mode == IOTimerChanMode_OneShot) ||
(mode == IOTimerChanMode_Trigger)) {
value = REG(channels_timer(channel), timer_io_channels[channel].ccr_offset);
}
}