diff --git a/src/drivers/px4flow/px4flow.cpp b/src/drivers/px4flow/px4flow.cpp index b5b0e26949..d22f6e0711 100644 --- a/src/drivers/px4flow/px4flow.cpp +++ b/src/drivers/px4flow/px4flow.cpp @@ -62,6 +62,7 @@ #include #include +#include #include @@ -255,6 +256,17 @@ PX4FLOW::init() /* sensor is ok, but we don't really know if it is within range */ _sensor_ok = true; + /* get rotation */ + param_t rot = param_find("SENS_FLOW_ROT"); + + /* only set it if the parameter exists */ + if (rot != PARAM_INVALID) { + int32_t val = 0; + param_get(rot, &val); + + _sensor_rotation = (enum Rotation)val; + } + return ret; }