Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed DRV88255 TextLCD Ping mbed-rtos
Diff: SalinityController.h
- Revision:
- 10:fd4670ec0806
- Parent:
- 7:8b3aef52aa7b
- Child:
- 26:966bad4c6365
--- a/SalinityController.h Fri Jun 10 12:56:53 2016 +0000
+++ b/SalinityController.h Fri Jun 10 22:21:04 2016 +0000
@@ -4,22 +4,29 @@
#include "mbed.h"
#include "stdio.h"
+#include "SensorController.h"
+
#define N 50
-class SalinityController {
+class SalinityController : public SensorController {
public:
- SalinityController();
+ SalinityController(bool threaded, int interval_ms) : SensorController(threaded, interval_ms) {}
- static void displayPPT();
- static float getPPT();
- static float getVoltage();
- static float getAdjustedPPT();
+ virtual void update();
+ virtual float getValue();
+ virtual std::string get_name();
private:
+ float salinity;
+
static float readSensor();
static float analoginToPPT(float analogin_value);
static float voltToSensor(float);
static float sensorToPPT(float);
+ static void displayPPT();
+ static float getPPT();
+ static float getVoltage();
+ static float getAdjustedPPT();
};
#endif
\ No newline at end of file