diff --git a/code/espurna/sensors/BaseSensor.h b/code/espurna/sensors/BaseSensor.h index 9f3854f6..e95a644a 100644 --- a/code/espurna/sensors/BaseSensor.h +++ b/code/espurna/sensors/BaseSensor.h @@ -46,19 +46,19 @@ class BaseSensor { virtual void post() {} // Descriptive name of the sensor - virtual String description() {} + virtual String description() = 0; // Address of the sensor (it could be the GPIO or I2C address) - virtual String address(unsigned char index) {} + virtual String address(unsigned char index) = 0; // Descriptive name of the slot # index - virtual String slot(unsigned char index) {}; + virtual String slot(unsigned char index) = 0; // Type for slot # index - virtual unsigned char type(unsigned char index) {} + virtual unsigned char type(unsigned char index) = 0; // Current value for slot # index - virtual double value(unsigned char index) {} + virtual double value(unsigned char index) = 0; // Retrieve current instance configuration virtual void getConfig(JsonObject& root) {}; diff --git a/code/espurna/sensors/EmonSensor.h b/code/espurna/sensors/EmonSensor.h index 527a4bda..13647f0d 100644 --- a/code/espurna/sensors/EmonSensor.h +++ b/code/espurna/sensors/EmonSensor.h @@ -146,7 +146,7 @@ class EmonSensor : public I2CSensor { #endif } - virtual unsigned int readADC(unsigned char channel) {} + virtual unsigned int readADC(unsigned char channel) = 0; void calculateFactors(unsigned char channel) {