Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Nov 11, 2024
1 parent b532402 commit bd540ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions BSB_LAN/BSB_LAN.ino
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ void listEnumValues(uint_farptr_t enumstr, uint16_t enumstr_len, const char *pre
bool isFirst = true;
if (decodedTelegram.type == VT_CUSTOM_BIT) c++; // first byte of VT_CUSTOM_BIT enumstr contains index to payload
if (decodedTelegram.enable_byte == 1) canBeDisabled = true; // Apparently, (some) read-only VT_BINARY_ENUM parameters can still be transmitted as "disabled" by the controller, so we have to take care for this here.

while (c + 2 < enumstr_len) {
if ((byte)(pgm_read_byte_far(enumstr+c+2))==' ') { // ENUMs must not contain two consecutive spaces! Necessary because VT_BIT bitmask may be 0x20 which equals space
val = uint16_t(pgm_read_byte_far(enumstr+c+1));
Expand Down Expand Up @@ -1790,7 +1790,6 @@ char *GetDateTime(char *date) {
}

void generateConfigPage(void) {
resetDecodedTelegram();
printToWebClient("<BR>" MENU_TEXT_MCU ": ");
printDeviceArchToWebClient();
printToWebClient("<BR>\r\n" MENU_TEXT_VER ": ");
Expand Down Expand Up @@ -2271,6 +2270,7 @@ void printConfigWebPossibleValues(int i, uint16_t temp_value, bool printCurrentS
}

void generateWebConfigPage(bool printOnly) {
resetDecodedTelegram();
printlnToWebClient(MENU_TEXT_CFG "<BR>");
if(!printOnly){
//This script will used for CPI_CHECKBOXES values calculation. It depended from HTML page structure: <div><input>...</input><label>...</label><label>...</label>...</div>
Expand Down
6 changes: 5 additions & 1 deletion BSB_LAN/include/print_telegram.h
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,11 @@ void printTelegram(byte* msg, float query_line) {

if (bus_type != BUS_PPS) {
decodedTelegram.msg_type = msg[4+bus->offset];
decodedTelegram.enable_byte = msg[9+bus->offset];
if (decodedTelegram.msg_type = TYPE_ANS) {
decodedTelegram.enable_byte = msg[9+bus->offset];
} else {
decodedTelegram.enable_byte = 0; // check if necessary to set enable_byte for sending SET telegram (logical values inverted, 01 = enable, 00 = disable)
}
msg_source_addr = msg[1+(bus_type*2)];
msg_dest_addr = msg[2];
// source
Expand Down

0 comments on commit bd540ce

Please sign in to comment.