Control.Mode: use PDI constants

Use PDI constants instead of local definitions.

Tested: Unit Tests Pass.

Change-Id: I556e87b2e4784a2653708adc919bdb5c10e9081a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/setsensor.cpp b/setsensor.cpp
index 3933e5d..884e52b 100644
--- a/setsensor.cpp
+++ b/setsensor.cpp
@@ -1,6 +1,7 @@
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/exception.hpp>
 #include <sdbusplus/message.hpp>
+#include <xyz/openbmc_project/Control/Mode/client.hpp>
 #include <xyz/openbmc_project/Sensor/Value/client.hpp>
 
 #include <cstdint>
@@ -11,11 +12,10 @@
 /* Fan Control */
 static constexpr auto objectPath = "/xyz/openbmc_project/settings/fanctrl/zone";
 static constexpr auto busName = "xyz.openbmc_project.State.FanCtrl";
-static constexpr auto intf = "xyz.openbmc_project.Control.Mode";
-static constexpr auto property = "Manual";
 using Value = std::variant<bool>;
 
 using SensorValue = sdbusplus::common::xyz::openbmc_project::sensor::Value;
+using ControlMode = sdbusplus::common::xyz::openbmc_project::control::Mode;
 
 /* Host Sensor. */
 static constexpr auto sobjectPath =
@@ -70,8 +70,8 @@
     auto pimMsg = PropertyWriteBus.new_method_call(
         busname.c_str(), path.c_str(), propertiesintf, "Set");
 
-    pimMsg.append(intf);
-    pimMsg.append(property);
+    pimMsg.append(ControlMode::interface);
+    pimMsg.append(ControlMode::property_names::manual);
     pimMsg.append(v);
 
     try