diff options
author | Julian Oes <julian@oes.ch> | 2013-10-11 10:16:45 +0200 |
---|---|---|
committer | Julian Oes <julian@oes.ch> | 2013-10-11 10:16:45 +0200 |
commit | e2fef6b374e14f8c0f383557cf3569f8265ba034 (patch) | |
tree | ba3b5ccc58f86a9168d5ca1d1ff2e97cceb04153 /src | |
parent | b25b9d37d53d3caab7c7eb2eed6f5cdbdd3f8804 (diff) | |
download | px4-firmware-e2fef6b374e14f8c0f383557cf3569f8265ba034.tar.gz px4-firmware-e2fef6b374e14f8c0f383557cf3569f8265ba034.tar.bz2 px4-firmware-e2fef6b374e14f8c0f383557cf3569f8265ba034.zip |
Use unsigned for channel counts
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/drv_pwm_output.h | 2 | ||||
-rw-r--r-- | src/drivers/hil/hil.cpp | 2 | ||||
-rw-r--r-- | src/modules/uORB/topics/actuator_outputs.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/drv_pwm_output.h b/src/drivers/drv_pwm_output.h index 5a3a126d0..3357e67a5 100644 --- a/src/drivers/drv_pwm_output.h +++ b/src/drivers/drv_pwm_output.h @@ -99,7 +99,7 @@ typedef uint16_t servo_position_t; struct pwm_output_values { /** desired pulse widths for each of the supported channels */ servo_position_t values[PWM_OUTPUT_MAX_CHANNELS]; - int channel_count; + unsigned channel_count; }; /* diff --git a/src/drivers/hil/hil.cpp b/src/drivers/hil/hil.cpp index 6563c3446..c1d73dd87 100644 --- a/src/drivers/hil/hil.cpp +++ b/src/drivers/hil/hil.cpp @@ -404,7 +404,7 @@ HIL::task_main() for (unsigned i = 0; i < num_outputs; i++) { /* last resort: catch NaN, INF and out-of-band errors */ - if (i < (unsigned)outputs.noutputs && + if (i < outputs.noutputs && isfinite(outputs.output[i]) && outputs.output[i] >= -1.0f && outputs.output[i] <= 1.0f) { diff --git a/src/modules/uORB/topics/actuator_outputs.h b/src/modules/uORB/topics/actuator_outputs.h index 30895ca83..446140423 100644 --- a/src/modules/uORB/topics/actuator_outputs.h +++ b/src/modules/uORB/topics/actuator_outputs.h @@ -60,7 +60,7 @@ struct actuator_outputs_s { uint64_t timestamp; /**< output timestamp in us since system boot */ float output[NUM_ACTUATOR_OUTPUTS]; /**< output data, in natural output units */ - int noutputs; /**< valid outputs */ + unsigned noutputs; /**< valid outputs */ }; /** |