Skip to content

Commit

Permalink
Rename SoC to Soc and LoadPoint to Loadpoint (evcc-io#5549)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Dec 23, 2022
1 parent 54f204c commit 03d6d14
Show file tree
Hide file tree
Showing 165 changed files with 1,054 additions and 1,032 deletions.
18 changes: 9 additions & 9 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ type ActionConfig struct {
Mode *ChargeMode `mapstructure:"mode,omitempty"` // Charge Mode
MinCurrent *float64 `mapstructure:"minCurrent,omitempty"` // Minimum Current
MaxCurrent *float64 `mapstructure:"maxCurrent,omitempty"` // Maximum Current
MinSoC *int `mapstructure:"minSoC,omitempty"` // Minimum SoC
TargetSoC *int `mapstructure:"targetSoC,omitempty"` // Target SoC
MinSoc *int `mapstructure:"minSoc,omitempty"` // Minimum Soc
TargetSoc *int `mapstructure:"targetSoc,omitempty"` // Target Soc
}

// Merge merges all non-nil properties of the additional config into the base config.
Expand All @@ -71,11 +71,11 @@ func (a ActionConfig) Merge(m ActionConfig) ActionConfig {
if m.MaxCurrent != nil {
a.MaxCurrent = m.MaxCurrent
}
if m.MinSoC != nil {
a.MinSoC = m.MinSoC
if m.MinSoc != nil {
a.MinSoc = m.MinSoc
}
if m.TargetSoC != nil {
a.TargetSoC = m.TargetSoC
if m.TargetSoc != nil {
a.TargetSoc = m.TargetSoc
}
return a
}
Expand Down Expand Up @@ -107,9 +107,9 @@ type MeterCurrent interface {
Currents() (float64, float64, float64, error)
}

// Battery is able to provide battery SoC in %
// Battery is able to provide battery Soc in %
type Battery interface {
SoC() (float64, error)
Soc() (float64, error)
}

// ChargeState provides current charging status
Expand Down Expand Up @@ -204,7 +204,7 @@ type VehiclePosition interface {

// SocLimiter returns the vehicles charge limit
type SocLimiter interface {
TargetSoC() (float64, error)
TargetSoc() (float64, error)
}

// VehicleChargeController allows to start/stop the charging session on the vehicle side
Expand Down
50 changes: 25 additions & 25 deletions api/proto/pb/vehicle.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions api/proto/pb/vehicle_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions api/proto/vehicle.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ option go_package = "proto/pb";

service Vehicle {
rpc New (NewRequest) returns (NewReply) {}
rpc SoC (SoCRequest) returns (SoCReply) {}
rpc Soc (SocRequest) returns (SocReply) {}
}

message NewRequest {
Expand All @@ -19,11 +19,11 @@ message NewReply {
int64 vehicle_id = 1;
}

message SoCRequest {
message SocRequest {
string token = 1;
int64 vehicle_id = 2;
}

message SoCReply {
message SocReply {
double soc = 1;
}
14 changes: 7 additions & 7 deletions assets/js/components/Energyflow/Energyflow.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Energyflow from "./Energyflow.vue";
:gridPower="1200"
:homePower="2000"
:batteryPower="800"
:batterySoC="77"
:batterySoc="77"
siteTitle="Home"
/>
</Variant>
Expand All @@ -40,7 +40,7 @@ import Energyflow from "./Energyflow.vue";
:loadpointsPower="1400"
:activeLoadpointsCount="1"
:batteryPower="-1500"
:batterySoC="75"
:batterySoc="75"
siteTitle="Home"
/>
</Variant>
Expand All @@ -53,7 +53,7 @@ import Energyflow from "./Energyflow.vue";
:gridPower="700"
:homePower="3300"
:batteryPower="1500"
:batterySoC="30"
:batterySoc="30"
siteTitle="Home"
/>
</Variant>
Expand All @@ -67,7 +67,7 @@ import Energyflow from "./Energyflow.vue";
:loadpointsPower="7500"
:activeLoadpointsCount="2"
:batteryPower="-700"
:batterySoC="95"
:batterySoc="95"
siteTitle="Home"
/>
</Variant>
Expand All @@ -82,7 +82,7 @@ import Energyflow from "./Energyflow.vue";
:loadpointsPower="5600"
:activeLoadpointsCount="2"
:batteryPower="800"
:batterySoC="76"
:batterySoc="76"
siteTitle="Home"
/>
</Variant>
Expand All @@ -97,7 +97,7 @@ import Energyflow from "./Energyflow.vue";
:loadpointsPower="5500"
:activeLoadpointsCount="1"
:batteryPower="0"
:batterySoC="0"
:batterySoc="0"
siteTitle="Home"
/>
</Variant>
Expand All @@ -110,7 +110,7 @@ import Energyflow from "./Energyflow.vue";
:gridPower="-300"
:homePower="300"
:batteryPower="-100"
:batterySoC="55"
:batterySoc="55"
siteTitle="Home"
/>
</Variant>
Expand Down
Loading

0 comments on commit 03d6d14

Please sign in to comment.