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.
Fork of ELEC351 by
Diff: DATA.cpp
- Revision:
- 10:46946784326d
- Parent:
- 8:0e4481b64353
- Child:
- 15:c1592fc1a501
diff -r 66670039f34b -r 46946784326d DATA.cpp
--- a/DATA.cpp Wed Dec 20 13:01:36 2017 +0000
+++ b/DATA.cpp Wed Dec 20 14:32:40 2017 +0000
@@ -1,42 +1,43 @@
#include "mbed.h"
+#include <string>
+#include "rtos.h"
#include "DATA.hpp"
-
DATA::DATA()
{
}
-void DATA::set_time(float time)
+void DATA::set_time(string time)
{
_Time = time;
}
-void DATA::set_temperature(float temp)
+void DATA::set_temperature(double temp)
{
_Temperature = temp;
}
-void DATA::set_pressure(float pressure)
+void DATA::set_pressure(double pressure)
{
_Pressure = pressure;
}
-void DATA::set_light(float light)
+void DATA::set_light(double light)
{
_Light = light;
}
//Getters
-float DATA::get_time()
+string DATA::get_time()
{
return _Time;
}
-float DATA::get_temperature()
+double DATA::get_temperature()
{
return _Temperature;
}
-float DATA::get_pressure()
+double DATA::get_pressure()
{
return _Pressure;
}
-float DATA::get_light()
+double DATA::get_light()
{
return _Light;
}
