Skip to content

Commit

Permalink
Added support for parameters that can only be queried via TYP_QINF
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Mar 15, 2024
1 parent 528a39a commit 9bf5e03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion BSB_LAN/BSB_LAN.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3548,7 +3548,11 @@ int set(float line // the ProgNr of the heater parameter
case VT_CUSTOM_ENUM:
{
uint8_t t=atoi(val);
bus->Send(TYPE_QINF, c, msg, tx_msg);
int8_t return_value = bus->Send(TYPE_QINF, c, msg, tx_msg);
if (return_value < 0) {
printlnToWebClient("No response to initial query, cannot get required data, aborting.");
printFmtToDebug("Error: %d", return_value);
}
int data_len;
if (bus->getBusType() == BUS_LPB) {
data_len=msg[bus->getLen_idx()]-14; // get packet length, then subtract
Expand Down Expand Up @@ -4126,7 +4130,11 @@ void query(float line) { // line (ProgNr)
if (bus->getBusType() != BUS_PPS) { // bus type is not PPS
retry=QUERY_RETRIES;
while (retry) {
uint8_t flags = get_cmdtbl_flags(i);
uint8_t query_type = TYPE_QUR;
if (flags & FL_QINF_ONLY) {
query_type = TYPE_QINF;
}
if (bus->Send(query_type, c, msg, tx_msg) == 1) {
// Decode the xmit telegram and send it to the PC serial interface
if (verbose) {
Expand Down
1 change: 1 addition & 0 deletions BSB_LAN/BSB_LAN_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
#define FL_OEM 8 // Known OEM parameters are set to read-only by default. If you want to have general write-access (not recommended!) to OEM parameters, set FL_OEM to 8.
#define FL_SPECIAL_INF 16 // Flag to distinguish between INF telegrams that reverse first two bytes (like room temperature) and those who don't (like outside temperature)
#define FL_EEPROM 32 // Flag to determine whether value should be written to EEPROM
#define FL_QINF_ONLY 64 // Flag to determine whether parameter needs to be queried via TYP_QUR or TYP_QINF (so far applies to Weishaupt only)
#define FL_SW_CTL_RONLY 128 //Software controlled read-only flag. if readOnlyMode = 1 then program values won't save. If readOnlyMode = 0 - new values can be set.
/* heating systems */

Expand Down

0 comments on commit 9bf5e03

Please sign in to comment.