Skip to content

Commit

Permalink
Merge branch 'lorenzodonini:master' into ocpp16_config_manager
Browse files Browse the repository at this point in the history
  • Loading branch information
xBlaz3kx authored Sep 6, 2024
2 parents 57814ce + 76ab870 commit 7e330d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ocpp1.6/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const (
MeasurandPowerReactiveExport Measurand = "Power.Reactive.Export"
MeasurandPowerReactiveImport Measurand = "Power.Reactive.Import"
MeasurandRPM Measurand = "RPM"
MeasueandSoC Measurand = "SoC"
MeasurandSoC Measurand = "SoC"
MeasurandTemperature Measurand = "Temperature"
MeasurandVoltage Measurand = "Voltage"
PhaseL1 Phase = "L1"
Expand Down 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 7e330d2

Please sign in to comment.