Skip to content

Commit

Permalink
More adjustments for FL_NOSWAP_QUR
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Mar 22, 2024
1 parent 67f188e commit 5b07a38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 2 additions & 6 deletions BSB_LAN/BSB_LAN.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1993,10 +1993,6 @@ void UpdateMaxDeviceList() {
writeToEEPROM(CF_MAX_DEVADDR);
}

void print_bus_send_failed(void) {
printlnToDebug(PSTR("bus send failed")); // to PC hardware serial I/F
}

void printPStr(uint_farptr_t outstr, uint16_t outstr_len) {
for (uint16_t x=0;x<outstr_len-1;x++) {
bigBuff[bigBuffPos] = pgm_read_byte_far(outstr+x);
Expand Down Expand Up @@ -5400,7 +5396,7 @@ void loop() {
if (((dev_fam != temp_dev_fam && dev_fam != DEV_FAM(DEV_ALL)) || (dev_var != temp_dev_var && dev_var != DEV_VAR(DEV_ALL))) && c!=CMD_UNKNOWN) {
printFmtToDebug(PSTR("%02X\r\n"), c);
if (bus->Send(TYPE_QUR, c, msg, tx_msg) != BUS_OK) {
print_bus_send_failed();
printlnToDebug(PSTR("bus send failed")); // to PC hardware serial I/F
} else {
if (msg[4+(bus->getBusType()*4)]!=TYPE_ERR) {
// Decode the xmit telegram and send it to the PC serial interface
Expand Down Expand Up @@ -5541,7 +5537,7 @@ void loop() {
}
int8_t return_value = bus->Send(type, c, msg, tx_msg, param, param_len, true);
if (return_value != BUS_OK) {
print_bus_send_failed();
printlnToDebug(PSTR("bus send failed")); // to PC hardware serial I/F
} else {
// Decode the xmit telegram and send it to the PC serial interface
printTelegram(tx_msg, -1);
Expand Down
3 changes: 3 additions & 0 deletions BSB_LAN/include/print_telegram.h
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,9 @@ void printTelegram(byte* msg, float query_line) {
while (1) {
i = findLine(query_line,i,&c);
uint16_t dev_flags = get_cmdtbl_flags(i);
if (dev_flags & FL_NOSWAP_QUR) {
c=((c & 0xFF000000) >> 8) | ((c & 0x00FF0000) << 8) | (c & 0x0000FFFF);
}
if (dev_flags & FL_SPECIAL_INF) {
c=((c & 0xFF000000) >> 8) | ((c & 0x00FF0000) << 8) | (c & 0x0000FFFF);
}
Expand Down

0 comments on commit 5b07a38

Please sign in to comment.