You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, I was trying to extend OpenTherm class by adding additional requests. Unfortunately when I run the extended class communication with boiler does not work. Exemplary code is attached here below. Do I do something wrong?
Du summarise. When I run OpenTherm *ot = new OpenTherm(1,2); ot->begin(handler);
it works. When I use the extension i.e. OpenThermExtension *ot = new OpenThermExtension(1,2); ot->begin(handler);
it does not. Obviously it compiles without any warning.
`
class OpenThermExtension : public OpenTherm {
public:
OpenThermExtension(int in, int out);
float getOutsideTemperature();
};
OpenThermExtension::OpenThermExtension(int in, int out) {
OpenTherm(in, out, false);
}
Hello everyone, I was trying to extend OpenTherm class by adding additional requests. Unfortunately when I run the extended class communication with boiler does not work. Exemplary code is attached here below. Do I do something wrong?
Du summarise. When I run
OpenTherm *ot = new OpenTherm(1,2); ot->begin(handler);
it works. When I use the extension i.e.
OpenThermExtension *ot = new OpenThermExtension(1,2); ot->begin(handler);
it does not. Obviously it compiles without any warning.
`
class OpenThermExtension : public OpenTherm {
public:
OpenThermExtension(int in, int out);
float getOutsideTemperature();
};
OpenThermExtension::OpenThermExtension(int in, int out) {
OpenTherm(in, out, false);
}
float OpenThermExtension::getOutsideTemperature() {
unsigned long request = buildRequest(OpenThermMessageType::READ_DATA, OpenThermMessageID::Toutside, 0);
unsigned long response = sendRequest(request);
Serial.println("Response: " + String(response));
float temp = getTemperature(request);
return temp;
}
`
The text was updated successfully, but these errors were encountered: