Skip to content
Snippets Groups Projects
Commit 00798d9b authored by Manon MALIQUE's avatar Manon MALIQUE
Browse files

Correcting bugs

parent a22ae4af
No related branches found
No related tags found
No related merge requests found
......@@ -631,6 +631,18 @@ boolean airquality::_loadConfig( JsonObject root ) {
return true;
}
//Manon
/* ------------------------------------------------------------------------------
* Protected methods
*/
/*
* Update the value of a and b of the sensor
*/
float airquality::calibrate(generic_driver _sensor) {
/* not implemented yet */
std::cout << "[Calibration] AirQuality sensor detected" << std::endl;
return 0;
}
/*
* sensOCampus sample module config (see end of file sensocampus.cpp for full config)
......
......@@ -96,7 +96,7 @@ class airquality : public base {
/*
* protected methods
*/
float calibrate(typeModule typeMod, generic_driver _sensor);
float calibrate(generic_driver _sensor);
};
......
......@@ -466,35 +466,4 @@ bool base::saveConfig( const char *filename, JsonObject root ) {
/*
* Update the value of a and b of a sensor
*/
float base::calibrate(typeModule typeMod, generic_drivers _sensor){
switch (typeMod){
case TEMPERATURE:
/* not implemented yet */
std::cout << "[Calibration] Temperature sensor detected" << std::endl;
for (int sensor : _sensors) {
std::cout << sensor << std::endl;
}
return 0;
case HUMIDITY:
/* not implemented yet */
std::cout << "[Calibration] Humidity sensor detected" << std::endl;
return 0;
case LUMINOSITY:
/* not implemented yet */
std::cout << "[Calibration] Luminosity sensor detected" << std::endl;
return 0;
case AIRQUALITY:
/* not implemented yet */
std::cout << "[Calibration] Airquality sensor detected" << std::endl;
return 0;
default:
/* nothing */
std::cout << "[Calibration] Test default :)" << std::endl;
return 0;
}
}
\ No newline at end of file
float base::calibrate(generic_driver _sensor){}
\ No newline at end of file
......@@ -513,3 +513,15 @@ bool humidity::saveConfig( void ) {
return base::saveConfig( MODULE_CONFIG_FILE(MQTT_MODULE_NAME), root );
}
//Manon
/* ------------------------------------------------------------------------------
* Protected methods
*/
/*
* Update the value of a and b of the sensor
*/
float humidity::calibrate(generic_driver _sensor) {
/* not implemented yet */
std::cout << "[Calibration] Humidity sensor detected" << std::endl;
return 0;
}
\ No newline at end of file
......@@ -97,7 +97,7 @@ class humidity : public base {
/*
* protected methods
*/
float calibrate(typeModule typeMod, generic_driver _sensor);
float calibrate(generic_driver _sensor);
};
......
......@@ -498,3 +498,15 @@ bool luminosity::saveConfig( void ) {
return base::saveConfig( MODULE_CONFIG_FILE(MQTT_MODULE_NAME), root );
}
//Manon
/* ------------------------------------------------------------------------------
* Protected methods
*/
/*
* Update the value of a and b of the sensor
*/
float luminosity::calibrate(generic_driver _sensor) {
/* not implemented yet */
std::cout << "[Calibration] Luminosity sensor detected" << std::endl;
return 0;
}
\ No newline at end of file
......@@ -100,7 +100,7 @@ class luminosity : public base {
/*
* protected methods
*/
float calibrate(typeModule typeMod, generic_driver _sensor);
float calibrate(generic_driver _sensor);
};
......
......@@ -536,3 +536,16 @@ bool temperature::saveConfig( void ) {
// call parent save
return base::saveConfig( MODULE_CONFIG_FILE(MQTT_MODULE_NAME), root );
}
//Manon
/* ------------------------------------------------------------------------------
* Protected methods
*/
/*
* Update the value of a and b of the sensor
*/
float temperature::calibrate(generic_driver _sensor) {
/* not implemented yet */
std::cout << "[Calibration] Temperature sensor detected" << std::endl;
return 0;
}
\ No newline at end of file
......@@ -101,7 +101,7 @@ class temperature : public base {
/*
* protected methods
*/
float calibrate(typeModule typeMod, generic_driver _sensor);
float calibrate(generic_driver _sensor);
};
#endif /* _TEMPERATURE_H_ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment