Skip to content

Commit

Permalink
Fix MeasurandSoC typo
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo <[email protected]>
  • Loading branch information
lorenzodonini committed Aug 26, 2024
1 parent 7df7543 commit 920b3cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ocpp1.6/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func isValidValueFormat(fl validator.FieldLevel) bool {
func isValidMeasurand(fl validator.FieldLevel) bool {
measurand := Measurand(fl.Field().String())
switch measurand {
case MeasueandSoC, MeasurandCurrentExport, MeasurandCurrentImport, MeasurandCurrentOffered, MeasurandEnergyActiveExportInterval, MeasurandEnergyActiveExportRegister, MeasurandEnergyReactiveExportInterval, MeasurandEnergyReactiveExportRegister, MeasurandEnergyReactiveImportRegister, MeasurandEnergyReactiveImportInterval, MeasurandEnergyActiveImportInterval, MeasurandEnergyActiveImportRegister, MeasurandFrequency, MeasurandPowerActiveExport, MeasurandPowerActiveImport, MeasurandPowerReactiveImport, MeasurandPowerReactiveExport, MeasurandPowerOffered, MeasurandPowerFactor, MeasurandVoltage, MeasurandTemperature, MeasurandRPM:
case MeasurandSoC, MeasurandCurrentExport, MeasurandCurrentImport, MeasurandCurrentOffered, MeasurandEnergyActiveExportInterval, MeasurandEnergyActiveExportRegister, MeasurandEnergyReactiveExportInterval, MeasurandEnergyReactiveExportRegister, MeasurandEnergyReactiveImportRegister, MeasurandEnergyReactiveImportInterval, MeasurandEnergyActiveImportInterval, MeasurandEnergyActiveImportRegister, MeasurandFrequency, MeasurandPowerActiveExport, MeasurandPowerActiveImport, MeasurandPowerReactiveImport, MeasurandPowerReactiveExport, MeasurandPowerOffered, MeasurandPowerFactor, MeasurandVoltage, MeasurandTemperature, MeasurandRPM:
return true
default:
return false
Expand Down
4 changes: 2 additions & 2 deletions ocpp2.0.1/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ const (
MeasurandPowerOffered Measurand = "Power.Offered"
MeasurandPowerReactiveExport Measurand = "Power.Reactive.Export"
MeasurandPowerReactiveImport Measurand = "Power.Reactive.Import"
MeasueandSoC Measurand = "SoC"
MeasurandSoC Measurand = "SoC"
MeasurandTemperature Measurand = "Temperature"
MeasurandVoltage Measurand = "Voltage"
PhaseL1 Phase = "L1"
Expand Down Expand Up @@ -626,7 +626,7 @@ func isValidReadingContext(fl validator.FieldLevel) bool {
func isValidMeasurand(fl validator.FieldLevel) bool {
measurand := Measurand(fl.Field().String())
switch measurand {
case MeasueandSoC, MeasurandCurrentExport, MeasurandCurrentImport, MeasurandCurrentOffered, MeasurandEnergyActiveExportInterval, MeasurandEnergyActiveExportRegister, MeasurandEnergyReactiveExportInterval, MeasurandEnergyReactiveExportRegister, MeasurandEnergyReactiveImportRegister, MeasurandEnergyReactiveImportInterval, MeasurandEnergyActiveImportInterval, MeasurandEnergyActiveImportRegister, MeasurandFrequency, MeasurandPowerActiveExport, MeasurandPowerActiveImport, MeasurandPowerReactiveImport, MeasurandPowerReactiveExport, MeasurandPowerOffered, MeasurandPowerFactor, MeasurandVoltage, MeasurandTemperature, MeasurandEnergyActiveNet, MeasurandEnergyApparentNet, MeasurandEnergyReactiveNet, MeasurandEnergyApparentImport, MeasurandEnergyApparentExport:
case MeasurandSoC, MeasurandCurrentExport, MeasurandCurrentImport, MeasurandCurrentOffered, MeasurandEnergyActiveExportInterval, MeasurandEnergyActiveExportRegister, MeasurandEnergyReactiveExportInterval, MeasurandEnergyReactiveExportRegister, MeasurandEnergyReactiveImportRegister, MeasurandEnergyReactiveImportInterval, MeasurandEnergyActiveImportInterval, MeasurandEnergyActiveImportRegister, MeasurandFrequency, MeasurandPowerActiveExport, MeasurandPowerActiveImport, MeasurandPowerReactiveImport, MeasurandPowerReactiveExport, MeasurandPowerOffered, MeasurandPowerFactor, MeasurandVoltage, MeasurandTemperature, MeasurandEnergyActiveNet, MeasurandEnergyApparentNet, MeasurandEnergyReactiveNet, MeasurandEnergyApparentImport, MeasurandEnergyApparentExport:
return true
default:
return false
Expand Down

0 comments on commit 920b3cc

Please sign in to comment.