|
29 | 29 | */ |
30 | 30 |
|
31 | 31 | #define DRIVER_NAME "Generic HID driver" |
32 | | -#define DRIVER_VERSION "0.62" |
| 32 | +#define DRIVER_VERSION "0.63" |
33 | 33 |
|
34 | 34 | #define HU_VAR_WAITBEFORERECONNECT "waitbeforereconnect" |
35 | 35 |
|
@@ -1519,19 +1519,24 @@ void upsdrv_initups(void) |
1519 | 1519 | lbrb_log_delay_sec = ipv; |
1520 | 1520 | } |
1521 | 1521 | } else { |
1522 | | - /* Activate APC BXnnnMI/BXnnnnMI tweaks, for details see |
| 1522 | + /* Activate APC BXnnnMI/BXnnnnMI/BVKnnnM2/BVKnnnnM2 tweaks, for details see |
1523 | 1523 | * https://github.com/networkupstools/nut/issues/2347 |
1524 | 1524 | */ |
1525 | 1525 | size_t productLen = hd->Product ? strlen(hd->Product) : 0; |
1526 | 1526 |
|
1527 | 1527 | /* FIXME: Consider also ups.mfr.date as 2023 or newer? |
1528 | 1528 | * Eventually up to some year this gets fixed? |
1529 | 1529 | */ |
1530 | | - if (hd->Vendor |
1531 | | - && productLen > 6 /* BXnnnMI at least */ |
1532 | | - && (!strcmp(hd->Vendor, "APC") || !strcmp(hd->Vendor, "American Power Conversion")) |
1533 | | - && (strstr(hd->Product, " BX") || strstr(hd->Product, "BX") == hd->Product) |
1534 | | - && (hd->Product[productLen - 2] == 'M' && hd->Product[productLen - 1] == 'I') |
| 1530 | + if ((hd->Vendor |
| 1531 | + && productLen > 6 /* BXnnnMI at least */ |
| 1532 | + && (!strcmp(hd->Vendor, "APC") || !strcmp(hd->Vendor, "American Power Conversion")) |
| 1533 | + && (strstr(hd->Product, " BX") || strstr(hd->Product, "BX") == hd->Product) |
| 1534 | + && (hd->Product[productLen - 2] == 'M' && hd->Product[productLen - 1] == 'I')) |
| 1535 | + || (hd->Vendor |
| 1536 | + && productLen > 7 /* BVKnnnM2 at least */ |
| 1537 | + && (!strcmp(hd->Vendor, "APC") || !strcmp(hd->Vendor, "American Power Conversion")) |
| 1538 | + && (strstr(hd->Product, " BVK") || strstr(hd->Product, "BVK") == hd->Product) |
| 1539 | + && (hd->Product[productLen - 2] == 'M' && hd->Product[productLen - 1] == '2')) |
1535 | 1540 | ) { |
1536 | 1541 | int got_lbrb_log_delay_without_calibrating = testvar("lbrb_log_delay_without_calibrating") ? 1 : 0, |
1537 | 1542 | got_onlinedischarge_calibration = testvar("onlinedischarge_calibration") ? 1 : 0, |
|
0 commit comments