double promotion warning fix or ignore per module

This commit is contained in:
Daniel Agar
2018-07-01 09:36:55 +00:00
committed by Lorenz Meier
parent 11d348ec4f
commit cf74166801
41 changed files with 93 additions and 75 deletions
@@ -485,8 +485,8 @@ CameraTrigger::test()
{
struct vehicle_command_s cmd = {
.timestamp = hrt_absolute_time(),
.param5 = 1.0f,
.param6 = 0.0f,
.param5 = 1.0,
.param6 = 0.0,
.param1 = 0.0f,
.param2 = 0.0f,
.param3 = 0.0f,
@@ -53,7 +53,7 @@ static constexpr const char PATH_MS5525[] = "/dev/ms5525";
/* Measurement rate is 100Hz */
static constexpr unsigned MEAS_RATE = 100;
static constexpr float MEAS_DRIVER_FILTER_FREQ = 1.2f;
static constexpr uint64_t CONVERSION_INTERVAL = (1000000 / MEAS_RATE); /* microseconds */
static constexpr int64_t CONVERSION_INTERVAL = (1000000 / MEAS_RATE); /* microseconds */
class MS5525 : public Airspeed
{
@@ -467,7 +467,7 @@ TERARANGER::ioctl(device::file_t *filp, int cmd, unsigned long arg)
bool want_start = (_measure_ticks == 0);
/* convert hz to tick interval via microseconds */
unsigned ticks = USEC2TICK(1000000 / arg);
int ticks = USEC2TICK(1000000 / arg);
/* check against maximum rate */
if (ticks < USEC2TICK(TERARANGER_CONVERSION_INTERVAL)) {
+2 -2
View File
@@ -63,8 +63,8 @@ int OutputMavlink::update(const ControlData *control_data)
{
vehicle_command_s vehicle_command = {
.timestamp = 0,
.param5 = 0.0f,
.param6 = 0.0f,
.param5 = 0.0,
.param6 = 0.0,
.param1 = 0.0f,
.param2 = 0.0f,
.param3 = 0.0f,