-
-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update lp.applyAction() handling #1942
Conversation
Vehicle connected and identified:
Reset to loadpoint defaults on vehicle disconnect:
|
…cle configuration (optional parameter)
Dump without OnIdentified and with Identifiers options:
|
Was willst Du hier erreichen? |
Das ist relevant im Zusammenhang mit:
Dadurch wurde minSoC bei Erkennung immer auf 0 gesetzt, auch wenn |
Das Problem ist doch aber, dass OnIdentified in dem Fall überhaupt ausgeführt wird, nicht dass irgendwas mit minSoC passiert, oder? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Danke für den PR- bitte schau mal die Kommentare an. Wenn ich alles richtig verstanden habe, scheint das eine gute Präzisierung des Verhaltens zu sein- vielen Dank!
Da hast du Recht. Der Effekt war in diesem Fall eben nur am minSoC zu sehen. |
Ich glaube das funktioniert nicht. |
Das wäre in der Tat noch eine Erweiterung auf die einzelnen Elemente des ActionConfig structs. Ansonsten funktioniert das Setzen auf |
Genau das funktioniert eben nicht (immer). Wenn ich das Feld gar nicht im YAML hab ists blöderweise auch Ich würde Vorschlagen, die Einzelwerte (alle) auf Pointer umzubauen und die Settings selbst ohne Pointer zu übergeben. |
Alles klar, das ist sicher am konsequentesten. Ich baue das dann noch um. Danke für dein Review. |
…mitempty mapstructure annotation
# Conflicts: # go.mod
So, habe es jetzt nochmal umgebaut: Alle Elemente von ActionConfig sind nun Pointer und die Vergleiche in |
core/loadpoint.go
Outdated
lp.publish("targetSoC", action.TargetSoC) | ||
lp.Unlock() | ||
func (lp *LoadPoint) applyAction(action *api.ActionConfig) { | ||
if action != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich find den doppelten Pointer merkwürdig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doppelter Pointer ist nun entfernt.
Das ist alles sehr unglücklich. Vmtl müssten wir die Standardkonfig auch als tristate (also mit Pointern) machen. Die würde ich aber ungern überall im Code haben. Mir fehlt grad eine gute Idee. So schein das Problem aus der letzten Überarbeiten jedenfalls immer noch vorhanden, nru diesmal von der Vehicle auf die Standardconfig verlagert. |
…oder wir argumentieren dass das „as designed“ ist. Bin grad unsicher. Dann könnte man nur am Fahrzeug entscheiden, ob Standardwerte überschrieben werden, der Standard selbst wird aber immer wieder hergestellt. |
Die Idee gefällt mir eigentlich gut. Bliebe also nur, das doppelte |
Danke Dir. Ich mache mich morgen nochmal ran. |
…ngs (evcc-io#1942) allow GetTargetSoC() and GetMinSoC() to be used even when no vehicle is connected use SetMinSoC() and SetTargetSoC() functions in applyAction() allow to set minSoC to 0 with applyAction() apply OnIdentify actions only when OnIdentify node is present in vehicle configuration (optional parameter)
GetTargetSoC()
andGetMinSoC()
to be used even when no vehicle is connectedSetMinSoC()
andSetTargetSoC(
) functions inapplyAction()
minSoC
to0
withapplyAction()
OnIdentify
actions only whenOnIdentify
node is present in vehicle configuration (optional parameter)