3rd Repo, trying to figure this out.
Fork of SOFT253_Template_Weather_OS_54 by
Diff: FakeSensor/FakeMeasurer.cpp
- Revision:
- 83:0d3572a8a851
- Parent:
- 50:c07e968b9582
- Child:
- 85:422d0a1b95cf
diff -r 668b51a39148 -r 0d3572a8a851 FakeSensor/FakeMeasurer.cpp --- a/FakeSensor/FakeMeasurer.cpp Thu May 11 15:53:15 2017 +0000 +++ b/FakeSensor/FakeMeasurer.cpp Thu May 11 19:23:55 2017 +0000 @@ -1,9 +1,14 @@ #include "FakeSensor.h" #include "mbed.h" -/* +/** Constructor Takes in minimum and maximum values for both temperature and humidity fake readings + + @param tempMin : Miniumum value for temperature. + @param tempMax : Maxiumum value for temperature. + @param humiMin : Miniumum value for humidity. + @param humiMax : Maxiumum value for humidity. */ FakeMeasurer::FakeMeasurer(float tempMin, float tempMax, float humiMin, float humiMax) { @@ -11,24 +16,27 @@ temperatureMax = tempMax; humidityMin = humiMin; humidityMax = humiMax; -} -/* - Simply returns true to fake successful initialisation +} + +/** + @return : True to fake successful initialisation of sensor. */ bool FakeMeasurer::init() { return true; } -/* - Simply fakes a calibration call to the sensor by doing nothing +/** + Fakes a calibration call to the sensor by doing nothing. */ void FakeMeasurer::calib() {} -/* +/** Generates a random number for both temperature and humidity using the ranges - given in the constructor - Stores the random numbers in the variables given + given in the constructor and stores the random numbers in the variables passed in. + + @param temperature : Pointer to float where temperature reading is stored. + @param humidity : Pointer to float where humidity reading is stored. */ void FakeMeasurer::ReadTempHumi(float *temperature, float *humidity) {