Skip to content

Commit

Permalink
Show Sensorbox 2 Wifi menu only on software v2.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mstegen committed Oct 21, 2024
1 parent 989f5fb commit c5bc617
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SmartEVSE-3/src/glcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ uint8_t getMenuItems (void) {
MenuItems[m++] = MENU_MAINSMETER; // - - Type of Mains electric meter (0: Disabled / Constants EM_*)
if (MainsMeter.Type == EM_SENSORBOX) { // - - ? Sensorbox?
if (GridActive == 1) MenuItems[m++] = MENU_GRID;
if (SB2.SoftwareVer >= 0x01) {
if (SB2.SoftwareVer == 0x01) {
MenuItems[m++] = MENU_SB2_WIFI; // Sensorbox-2 Wifi 0:Disabled / 1:Enabled / 2:Portal
}
} else if (MainsMeter.Type && MainsMeter.Type != EM_API) { // - - ? Other?
Expand Down
2 changes: 1 addition & 1 deletion SmartEVSE-3/src/meter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ uint8_t Meter::receiveCurrentMeasurement(uint8_t *buf) {
SB2.SoftwareVer = buf[0];
// Make sure the version and datalength are correct before processing the data.
// the version alone does not indicate that we have read the extended registers.
if (SB2.SoftwareVer >= 1 && MB.DataLength == 64) {
if (SB2.SoftwareVer == 1 && MB.DataLength == 64) {
// Read Status, IP, AP Password from Sensorbox
SB2.WiFiConnected = buf[40]>>1 & 1;
SB2.WiFiAPSTA = buf[40]>>2 & 1;
Expand Down

0 comments on commit c5bc617

Please sign in to comment.