[riot-notifications] [RIOT-OS/RIOT] drivers/ph_oem: support for Atlas Scientific pH OEM sensor (#10983)

Igor Knippenberg notifications at github.com
Sat Feb 23 22:40:44 CET 2019


skullbox305 commented on this pull request.



> +    /* Read raw pH value */
+    if (ph_oem_read_ph(mydev, res->val) < 0) {
+        return -ECANCELED;
+    }
+    res->unit = UNIT_PH;
+    res->scale = -3;
+
+    return 1;
+}
+
+/* Sets the temperature compensation for taking accurate pH readings */
+static int set_temp_compensation(const void *dev, phydat_t *res)
+{
+    const ph_oem_t *mydev = dev;
+
+    ph_oem_set_compensation(mydev, res->val[0]);

added check to detect errors

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10983#discussion_r259594165
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190223/33f2a8d6/attachment.html>


More information about the notifications mailing list