aboutsummaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2013-10-11 10:16:45 +0200
committerJulian Oes <julian@oes.ch>2013-10-11 10:16:45 +0200
commite2fef6b374e14f8c0f383557cf3569f8265ba034 (patch)
treeba3b5ccc58f86a9168d5ca1d1ff2e97cceb04153 /src/drivers
parentb25b9d37d53d3caab7c7eb2eed6f5cdbdd3f8804 (diff)
downloadpx4-firmware-e2fef6b374e14f8c0f383557cf3569f8265ba034.tar.gz
px4-firmware-e2fef6b374e14f8c0f383557cf3569f8265ba034.tar.bz2
px4-firmware-e2fef6b374e14f8c0f383557cf3569f8265ba034.zip
Use unsigned for channel counts
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/drv_pwm_output.h2
-rw-r--r--src/drivers/hil/hil.cpp2
2 files changed, 2 insertions, 2 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) {