Adding to support double type

- The current OpenBMC's value dbus property type has been changed
  to 'double', so adding to support double type in yaml and format.

phosphor-dbus-interfaces PR:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/11739

Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw.com>
Change-Id: Ic02ce6c8bf91490f7709365c9cbab57b12a264cc
diff --git a/src/format.hpp b/src/format.hpp
index cbece27..8fa6dc8 100644
--- a/src/format.hpp
+++ b/src/format.hpp
@@ -49,6 +49,11 @@
     static constexpr auto format = "=%lld";
 };
 template <>
+struct GetFormatType<double>
+{
+    static constexpr auto format = "=%lf";
+};
+template <>
 struct GetFormatType<unsigned char>
 {
     static constexpr auto format = "=%hhd";
diff --git a/src/pdmgen.py b/src/pdmgen.py
index b0e0908..0f9a13b 100755
--- a/src/pdmgen.py
+++ b/src/pdmgen.py
@@ -122,6 +122,8 @@
             return Cast('static', '{0}_t'.format(self.type))(arg)
         elif self.type == 'byte':
             return Cast('static', 'uint8_t'.format(self.type))(arg)
+        elif self.type == 'double':
+            return Cast('static', 'double'.format(self.type))(arg)
 
         if self.type == 'string':
             return '{0}s'.format(arg)