Skip to content

Commit

Permalink
Fixed VT_CURRENT/VT_CURRENT1000 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Feb 1, 2025
1 parent 41fbabd commit 06ed73c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BSB_LAN/BSB_LAN_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ const units optbl[]={
{VT_POWER_SHORT, 1.0, 1, 2, DT_VALS, 0, U_WATT, sizeof(U_WATT), STR_POWER_SHORT},
{VT_POWER_SHORT_N, 1.0, 6, 2, DT_VALS, 0, U_WATT, sizeof(U_WATT), STR_POWER_SHORT},
{VT_SPF, 100.0, 0, 2, DT_VALS, 2, U_NONE, sizeof(U_NONE), STR_SPF},
{VT_CURRENT, 100.0, 0, 2, DT_VALS, 2, U_CURR, sizeof(U_CURR), STR_CURRENT},
{VT_CURRENT, 1000.0, 0, 2, DT_VALS, 2, U_CURR, sizeof(U_CURR), STR_CURRENT},
{VT_CURRENT1000, 1000.0, 0, 2, DT_VALS, 2, U_CURR, sizeof(U_CURR), STR_CURRENT1000},
{VT_DAYS_WORD, 1.0, 1, 2, DT_VALS, 0, U_DAYS, sizeof(U_DAYS), STR_DAYS_WORD},
{VT_ERRORCODE, 1.0, 0, 0, DT_ENUM, 0, U_NONE, sizeof(U_NONE), STR_ERRORCODE},
Expand Down
2 changes: 1 addition & 1 deletion BSB_LAN/include/print_telegram.h
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ void printTelegram(byte* msg, float query_line) {
case VT_ENERGY_WORD_N: // u16 / 10.0 kWh
case VT_SPF: // u16 / 100
case VT_ENERGY_CONTENT: // u16 / 10.0 kWh/m³
case VT_CURRENT: // u16 / 100 uA
case VT_CURRENT: // u16 / 100 uA // actually, there doesn't seem to be a divisor of 100, but rather 1000. So VT_CURRENT and VT_CURRENT1000 should be the same. Both are kept for compatibility reasons with older parameter files
case VT_CURRENT1000:
case VT_PROPVAL: // u16 / 16
case VT_SPEED: // u16
Expand Down

0 comments on commit 06ed73c

Please sign in to comment.