mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-25 17:43:35 +05:00
Compare commits
5 Commits
eb943dc447
...
ae434b751a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae434b751a | ||
|
|
0d3adad446 | ||
|
|
77d80225ad | ||
|
|
dc68315166 | ||
|
|
5d0ca68dc0 |
@@ -112,6 +112,27 @@ public:
|
||||
return (byte)id == responseId;
|
||||
}
|
||||
|
||||
static uint8_t getResponseMessageTypeId(unsigned long response) {
|
||||
return (response << 1) >> 29;
|
||||
}
|
||||
|
||||
static const char* getResponseMessageTypeString(unsigned long response) {
|
||||
uint8_t msgType = getResponseMessageTypeId(response);
|
||||
|
||||
switch (msgType) {
|
||||
case (uint8_t) OpenThermMessageType::READ_ACK:
|
||||
case (uint8_t) OpenThermMessageType::WRITE_ACK:
|
||||
case (uint8_t) OpenThermMessageType::DATA_INVALID:
|
||||
case (uint8_t) OpenThermMessageType::UNKNOWN_DATA_ID:
|
||||
return CustomOpenTherm::messageTypeToString(
|
||||
static_cast<OpenThermMessageType>(msgType)
|
||||
);
|
||||
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
// converters
|
||||
template <class T>
|
||||
static unsigned int toFloat(const T val) {
|
||||
|
||||
@@ -93,8 +93,13 @@ protected:
|
||||
this->instance->setAfterSendRequestCallback([this](unsigned long request, unsigned long response, OpenThermResponseStatus status, byte attempt) {
|
||||
Log.sverboseln(
|
||||
FPSTR(L_OT),
|
||||
F("ID: %4d Request: %8lx Response: %8lx Attempt: %2d Status: %s"),
|
||||
CustomOpenTherm::getDataID(request), request, response, attempt, CustomOpenTherm::statusToString(status)
|
||||
F("ID: %4d Request: %8lx Response: %8lx Msg type: %s Attempt: %2d Status: %s"),
|
||||
CustomOpenTherm::getDataID(request),
|
||||
request,
|
||||
response,
|
||||
CustomOpenTherm::getResponseMessageTypeString(response),
|
||||
attempt,
|
||||
CustomOpenTherm::statusToString(status)
|
||||
);
|
||||
|
||||
if (status == OpenThermResponseStatus::SUCCESS) {
|
||||
@@ -1185,17 +1190,17 @@ protected:
|
||||
|
||||
bool needSetDhwTemp(const float target) {
|
||||
return millis() - this->dhwSetTempTime > this->dhwSetTempInterval
|
||||
|| fabsf(target - vars.slave.dhw.targetTemp) > 0.001f;
|
||||
|| fabsf(target - vars.slave.dhw.targetTemp) > 0.05f;
|
||||
}
|
||||
|
||||
bool needSetHeatingTemp(const float target) {
|
||||
return millis() - this->heatingSetTempTime > this->heatingSetTempInterval
|
||||
|| fabsf(target - vars.slave.heating.targetTemp) > 0.001f;
|
||||
|| fabsf(target - vars.slave.heating.targetTemp) > 0.05f;
|
||||
}
|
||||
|
||||
bool needSetCh2Temp(const float target) {
|
||||
return millis() - this->ch2SetTempTime > this->ch2SetTempInterval
|
||||
|| fabsf(target - vars.slave.ch2.targetTemp) > 0.001f;
|
||||
|| fabsf(target - vars.slave.ch2.targetTemp) > 0.05f;
|
||||
}
|
||||
|
||||
bool updateSlaveConfig() {
|
||||
@@ -1356,7 +1361,7 @@ protected:
|
||||
return CustomOpenTherm::getUInt(response) == request;
|
||||
}
|
||||
|
||||
bool setMaxHeatingTemp(const uint8_t temperature) {
|
||||
bool setMaxHeatingTemp(const float temperature) {
|
||||
const unsigned int request = CustomOpenTherm::temperatureToData(temperature);
|
||||
const unsigned long response = this->instance->sendRequest(CustomOpenTherm::buildRequest(
|
||||
OpenThermMessageType::WRITE_DATA,
|
||||
|
||||
@@ -342,15 +342,15 @@
|
||||
"equitherm": {
|
||||
"slope": {
|
||||
"title": "Slope",
|
||||
"note": ""
|
||||
"note": "Heat loss compensation. Main tuning parameter."
|
||||
},
|
||||
"exponent": {
|
||||
"title": "Exponent",
|
||||
"note": ""
|
||||
"note": "Radiator efficiency. Typical values: 1.1 - Floor heating, 1.2 - Cast iron, 1.3 - Panel radiators, 1.4 - Convectors."
|
||||
},
|
||||
"shift": {
|
||||
"title": "Shift",
|
||||
"note": ""
|
||||
"note": "Compensates for additional heat losses (e.g., in pipes) or extra heat sources."
|
||||
},
|
||||
"targetDiffFactor": {
|
||||
"title": "T factor",
|
||||
|
||||
@@ -342,15 +342,15 @@
|
||||
"equitherm": {
|
||||
"slope": {
|
||||
"title": "Pendenza",
|
||||
"note": ""
|
||||
"note": "Compensazione delle perdite di calore. Principale parametro di regolazione."
|
||||
},
|
||||
"exponent": {
|
||||
"title": "Esponente",
|
||||
"note": ""
|
||||
"note": "Efficienza del radiatore. Valori tipici: 1.1 - Riscaldamento a pavimento, 1.2 - Radiatori in ghisa, 1.3 - Radiatori a pannelli, 1.4 - Convetttori."
|
||||
},
|
||||
"shift": {
|
||||
"title": "Spostare",
|
||||
"note": ""
|
||||
"note": "Compensa le perdite di calore aggiuntive (ad esempio, nelle tubature) o fonti di calore extra."
|
||||
},
|
||||
"targetDiffFactor": {
|
||||
"title": "Fattore T",
|
||||
|
||||
@@ -342,15 +342,15 @@
|
||||
"equitherm": {
|
||||
"slope": {
|
||||
"title": "Наклон",
|
||||
"note": ""
|
||||
"note": "Компенсация теплопотерь. Основной параметр настройки."
|
||||
},
|
||||
"exponent": {
|
||||
"title": "Экспонента",
|
||||
"note": ""
|
||||
"note": "Эффективность радиатора. Типичные значения: 1.1 - Тёплый пол, 1.2 - Чугунные радиаторы, 1.3 - Панельные радиаторы, 1.4 - Конвекторы."
|
||||
},
|
||||
"shift": {
|
||||
"title": "Смещение",
|
||||
"note": ""
|
||||
"note": "Компенсирует дополнительные теплопотери (например, в трубах) или дополнительные источники тепла."
|
||||
},
|
||||
"targetDiffFactor": {
|
||||
"title": "Коэффициент T",
|
||||
|
||||
Reference in New Issue
Block a user