diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-06 10:16:50 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-06 10:16:50 +0100 |
commit | f89cd312ec97440de5d07fc83f2b373312eef5ab (patch) | |
tree | bccb54036097bf13faeb06ffc61750928d1c64d4 /apps/drivers/px4io/px4io.cpp | |
parent | a9e87c791ddedb4b820c99c79a830f157fb46e46 (diff) | |
download | px4-firmware-f89cd312ec97440de5d07fc83f2b373312eef5ab.tar.gz px4-firmware-f89cd312ec97440de5d07fc83f2b373312eef5ab.tar.bz2 px4-firmware-f89cd312ec97440de5d07fc83f2b373312eef5ab.zip |
Used correct datatype, removed unwanted cast
Diffstat (limited to 'apps/drivers/px4io/px4io.cpp')
-rw-r--r-- | apps/drivers/px4io/px4io.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/drivers/px4io/px4io.cpp b/apps/drivers/px4io/px4io.cpp index f24beaf53..554cf7e0c 100644 --- a/apps/drivers/px4io/px4io.cpp +++ b/apps/drivers/px4io/px4io.cpp @@ -104,7 +104,7 @@ public: private: // XXX static const unsigned _max_actuators = PX4IO_CONTROL_CHANNELS; - int _update_rate; ///< serial send rate in Hz + unsigned _update_rate; ///< serial send rate in Hz int _serial_fd; ///< serial interface to PX4IO hx_stream_t _io_stream; ///< HX protocol stream @@ -316,7 +316,7 @@ void PX4IO::task_main() { log("starting"); - int update_rate_in_ms; + unsigned update_rate_in_ms; /* open the serial port */ _serial_fd = ::open("/dev/ttyS2", O_RDWR); @@ -356,7 +356,7 @@ PX4IO::task_main() _t_actuators = orb_subscribe(_primary_pwm_device ? ORB_ID_VEHICLE_ATTITUDE_CONTROLS : ORB_ID(actuator_controls_1)); /* convert the update rate in hz to milliseconds, rounding down if necessary */ - update_rate_in_ms = int(1000 / _update_rate); + update_rate_in_ms = 1000 / _update_rate; orb_set_interval(_t_actuators, update_rate_in_ms); _t_armed = orb_subscribe(ORB_ID(actuator_armed)); |