Mario Simaremare / Mbed 2 deprecated g3_waterplay

Dependencies:   mbed

Revision:
5:4cbe44452889
Parent:
3:7c648d1d8802
Child:
11:dcaaf1bb21ce
diff -r d8914369bf82 -r 4cbe44452889 SalinitySensor.h
--- a/SalinitySensor.h	Fri Jun 17 09:24:01 2016 +0000
+++ b/SalinitySensor.h	Fri Jun 17 11:03:37 2016 +0000
@@ -13,13 +13,14 @@
 public:
     SalinitySensor(
         Printer &printer,
-        PinName pin,
-        double const_voltage,
-        double const_converter,
-        double const_multiplier,
-        double const_lower_boundary,
-        double const_upper_boundary
+        PinName pin
     );
+    static const double VIN = 3.3;
+    static const double CONVERTER = 1.6667;
+    static const double MULTIPLIER = 16.3;
+    static const double LOWER_BOUNDARY = 3.0;
+    static const double UPPER_BOUNDARY = 6.9;
+    static const int SAMPLING_NUMBER = 100;
     void reload();
     double getReading();
     double getVoltage();
@@ -30,12 +31,6 @@
 private:
     Printer &_printer;
     AnalogIn _analog_in;
-    double _const_voltage;
-    double _const_converter;
-    double _const_multiplier;
-    double _const_lower_boundary;
-    double _const_upper_boundary;
-    int _const_sample_number;
     double _reading;
     double _voltage;
     double _salinity;