Skip to content

Commit

Permalink
Update modules/siemens/s7.go
Browse files Browse the repository at this point in the history
Co-authored-by: Phillip Stephens <[email protected]>
  • Loading branch information
developStorm and phillip-stephens authored Apr 17, 2024
1 parent cb5f2b8 commit 42946b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/siemens/s7.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,12 @@ func parseModuleIdentificationRequest(logStruct *S7Log, s7Packet *S7Packet) erro
return fmt.Errorf("failed parsing data record %d: %v", i, err)
}

switch {
case record.Index == S7_MODULE_ID_MODULE_INDEX:
switch record.Index {
case S7_MODULE_ID_MODULE_INDEX:
logStruct.ModuleId = record.MIFB
case record.Index == S7_MODULE_ID_HARDWARE_INDEX:
case S7_MODULE_ID_HARDWARE_INDEX:
logStruct.Hardware = getVersionNumber(record)
case record.Index == S7_MODULE_ID_FIRMWARE_INDEX:
case S7_MODULE_ID_FIRMWARE_INDEX:
logStruct.Firmware = getVersionNumber(record)
}

Expand Down

0 comments on commit 42946b8

Please sign in to comment.