Skip to content

Commit

Permalink
Ocpp: support Mennekes measurand notation (evcc-io#16255)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Sep 21, 2024
1 parent aa96693 commit 3ca3955
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion charger/ocpp/cp_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ func (cp *CP) Setup(meterValues string, meterInterval time.Duration) error {
if opt.Readonly {
meterValuesSampledDataMaxLength = 0
}
cp.meterValuesSample = *opt.Value
cp.meterValuesSample = strings.Join(lo.Map(strings.Split(*opt.Value, ","), func(s string, _ int) string {
return strings.Trim(s, "' ")
}), ",")

case match(KeyMeterValuesSampledDataMaxLength):
if val, err := strconv.Atoi(*opt.Value); err == nil {
Expand Down

0 comments on commit 3ca3955

Please sign in to comment.