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

Correcting bugs

parent a7a82429
Branches
No related tags found
No related merge requests found
...@@ -452,7 +452,7 @@ void airquality::_process_sensors( void ) { ...@@ -452,7 +452,7 @@ void airquality::_process_sensors( void ) {
#ifdef INCR_SW #ifdef INCR_SW
if( checkCALIBRATIONswitch(DECR_SW, INCR_SW) == true ) { if( checkCALIBRATIONswitch(DECR_SW, INCR_SW) == true ) {
// CALIBRATION of the sensor // CALIBRATION of the sensor
log_debug(F("[Calibration] Deviation value ="));log_debug(calibrate(typeM, cur_sensor),FLOAT_RESOLUTION); log_flush(); log_debug(F("[Calibration] Deviation value ="));log_debug(calibrate(cur_sensor),FLOAT_RESOLUTION); log_flush();
} }
#endif #endif
#endif #endif
...@@ -638,7 +638,7 @@ boolean airquality::_loadConfig( JsonObject root ) { ...@@ -638,7 +638,7 @@ boolean airquality::_loadConfig( JsonObject root ) {
/* /*
* Update the value of a and b of the sensor * Update the value of a and b of the sensor
*/ */
float airquality::calibrate(generic_driver _sensor) { float airquality::calibrate(uint8_t _sensor) {
/* not implemented yet */ /* not implemented yet */
std::cout << "[Calibration] AirQuality sensor detected" << std::endl; std::cout << "[Calibration] AirQuality sensor detected" << std::endl;
return 0; return 0;
......
...@@ -96,7 +96,7 @@ class airquality : public base { ...@@ -96,7 +96,7 @@ class airquality : public base {
/* /*
* protected methods * protected methods
*/ */
float calibrate(generic_driver _sensor); float calibrate(uint8_t _sensor);
}; };
......
...@@ -466,4 +466,4 @@ bool base::saveConfig( const char *filename, JsonObject root ) { ...@@ -466,4 +466,4 @@ bool base::saveConfig( const char *filename, JsonObject root ) {
/* /*
* Update the value of a and b of a sensor * Update the value of a and b of a sensor
*/ */
float base::calibrate(generic_driver _sensor){} float base::calibrate(uint8_t _sensor){}
\ No newline at end of file \ No newline at end of file
...@@ -107,7 +107,7 @@ class base { ...@@ -107,7 +107,7 @@ class base {
/* /*
* public functions * public functions
*/ */
float calibrate(generic_driver _sensor); float calibrate(uint8_t _sensor);
private: private:
/* /*
......
...@@ -317,7 +317,7 @@ void humidity::_process_sensors( void ) { ...@@ -317,7 +317,7 @@ void humidity::_process_sensors( void ) {
// #ifdef INCR_SW // #ifdef INCR_SW
// if( checkCALIBRATIONswitch(DECR_SW, INCR_SW) == true ) { // if( checkCALIBRATIONswitch(DECR_SW, INCR_SW) == true ) {
// // CALIBRATION of the sensor // // CALIBRATION of the sensor
// log_debug(F("[Calibration] Deviation value ="));log_debug(calibrate(typeM, cur_sensor),FLOAT_RESOLUTION); log_flush(); // log_debug(F("[Calibration] Deviation value ="));log_debug(calibrate(cur_sensor),FLOAT_RESOLUTION); log_flush();
// } // }
// #endif // #endif
//#endif //#endif
...@@ -520,7 +520,7 @@ bool humidity::saveConfig( void ) { ...@@ -520,7 +520,7 @@ bool humidity::saveConfig( void ) {
/* /*
* Update the value of a and b of the sensor * Update the value of a and b of the sensor
*/ */
float humidity::calibrate(generic_driver _sensor) { float humidity::calibrate(uint8_t _sensor) {
/* not implemented yet */ /* not implemented yet */
std::cout << "[Calibration] Humidity sensor detected" << std::endl; std::cout << "[Calibration] Humidity sensor detected" << std::endl;
return 0; return 0;
......
...@@ -97,7 +97,7 @@ class humidity : public base { ...@@ -97,7 +97,7 @@ class humidity : public base {
/* /*
* protected methods * protected methods
*/ */
float calibrate(generic_driver _sensor); float calibrate(uint8_t _sensor);
}; };
......
...@@ -301,7 +301,7 @@ void luminosity::_process_sensors( void ) { ...@@ -301,7 +301,7 @@ void luminosity::_process_sensors( void ) {
#ifdef INCR_SW #ifdef INCR_SW
if( checkCALIBRATIONswitch(DECR_SW, INCR_SW) == true ) { if( checkCALIBRATIONswitch(DECR_SW, INCR_SW) == true ) {
// CALIBRATION of the sensor // CALIBRATION of the sensor
log_debug(F("[Calibration] Deviation value luminosity="));log_debug(calibrate(typeM, cur_sensor),FLOAT_RESOLUTION); log_flush(); log_debug(F("[Calibration] Deviation value luminosity="));log_debug(calibrate(cur_sensor),FLOAT_RESOLUTION); log_flush();
} }
#endif #endif
#endif #endif
...@@ -505,7 +505,7 @@ bool luminosity::saveConfig( void ) { ...@@ -505,7 +505,7 @@ bool luminosity::saveConfig( void ) {
/* /*
* Update the value of a and b of the sensor * Update the value of a and b of the sensor
*/ */
float luminosity::calibrate(generic_driver _sensor) { float luminosity::calibrate(uint8_t _sensor) {
/* not implemented yet */ /* not implemented yet */
std::cout << "[Calibration] Luminosity sensor detected" << std::endl; std::cout << "[Calibration] Luminosity sensor detected" << std::endl;
return 0; return 0;
......
...@@ -100,7 +100,7 @@ class luminosity : public base { ...@@ -100,7 +100,7 @@ class luminosity : public base {
/* /*
* protected methods * protected methods
*/ */
float calibrate(generic_driver _sensor); float calibrate(uint8_t _sensor);
}; };
......
...@@ -339,7 +339,7 @@ void temperature::_process_sensors( void ) { ...@@ -339,7 +339,7 @@ void temperature::_process_sensors( void ) {
log_debug(F("\n[temperature][calibration] L'appui simultanné sur les deux boutons +/- fonctionne :)")); log_flush(); log_debug(F("\n[temperature][calibration] L'appui simultanné sur les deux boutons +/- fonctionne :)")); log_flush();
//if( checkCALIBRATIONswitch(DECR_SW, INCR_SW) == true ) { //if( checkCALIBRATIONswitch(DECR_SW, INCR_SW) == true ) {
// CALIBRATION of the sensor // CALIBRATION of the sensor
// log_debug(F("\n[Calibration] Deviation value ="));log_debug(calibrate(typeM, cur_sensor),FLOAT_RESOLUTION); log_flush(); // log_debug(F("\n[Calibration] Deviation value ="));log_debug(calibrate(cur_sensor),FLOAT_RESOLUTION); log_flush();
//} //}
#endif #endif
#endif #endif
...@@ -544,7 +544,7 @@ bool temperature::saveConfig( void ) { ...@@ -544,7 +544,7 @@ bool temperature::saveConfig( void ) {
/* /*
* Update the value of a and b of the sensor * Update the value of a and b of the sensor
*/ */
float temperature::calibrate(generic_driver _sensor) { float temperature::calibrate(uint8_t _sensor) {
/* not implemented yet */ /* not implemented yet */
std::cout << "[Calibration] Temperature sensor detected" << std::endl; std::cout << "[Calibration] Temperature sensor detected" << std::endl;
return 0; return 0;
......
...@@ -101,7 +101,7 @@ class temperature : public base { ...@@ -101,7 +101,7 @@ class temperature : public base {
/* /*
* protected methods * protected methods
*/ */
float calibrate(generic_driver _sensor); float calibrate(uint8_t _sensor);
}; };
#endif /* _TEMPERATURE_H_ */ #endif /* _TEMPERATURE_H_ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment