bugfix: grab hystersis parameter from pid json

The code incorrectly attempts to read the hystersis parameters from the
wrong scope of the json object.  This fixes it to read from the pid
configuration's scope.

Tested: Added a new unit-test to hit this case.
Change-Id: I808bc907ec33a0b12d68a88fd316c3c9fae41516
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/pid/buildjson.cpp b/pid/buildjson.cpp
index d31b6bc..ad51d9b 100644
--- a/pid/buildjson.cpp
+++ b/pid/buildjson.cpp
@@ -56,7 +56,7 @@
     }
     else
     {
-        j.at("positiveHysteresis").get_to(c.pidInfo.positiveHysteresis);
+        p.at("positiveHysteresis").get_to(c.pidInfo.positiveHysteresis);
     }
 
     auto negativeHysteresis = p.find("negativeHysteresis");
@@ -66,7 +66,7 @@
     }
     else
     {
-        j.at("negativeHysteresis").get_to(c.pidInfo.negativeHysteresis);
+        p.at("negativeHysteresis").get_to(c.pidInfo.negativeHysteresis);
     }
 }
 } // namespace conf