-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add solar & wind priority feature #1853
Conversation
091a19d
to
7057aea
Compare
7057aea
to
06fed4b
Compare
|
||
OverviewWidget { | ||
id: root | ||
|
||
readonly property string vebusPrefix: BackendConnection.serviceUidFromName(Global.acInputs.highlightedInput.inputInfo.serviceName, Global.acInputs.highlightedInput.inputInfo.deviceInstance) | ||
readonly property bool preferRenewable: preferRenewableEnergy.isValid |
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.
this is a bit different to how we usually do things. 'preferRenewable' is true if the path is valid, regardless of the value at that path, as per gui-v1
components/widgets/BatteryWidget.qml
Outdated
|
||
OverviewWidget { | ||
id: root | ||
|
||
readonly property string vebusPrefix: BackendConnection.serviceUidFromName(Global.acInputs.highlightedInput.inputInfo.serviceName, Global.acInputs.highlightedInput.inputInfo.deviceInstance) |
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.
This won't point to a vebus
service if the highlightedInput is provided by e.g. a grid
energy meter that's not plugged into VE.Bus.
In gui-v1 this vebusPrefix refers to the "system vebus service" provided by com.victronenergy.system/VebusService
, which can be accessed in gui-v2 via Global.system.veBus.serviceUid
.
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.
thanks Bea, updated
|
||
OverviewWidget { | ||
id: root | ||
|
||
readonly property string vebusPrefix: BackendConnection.serviceUidFromName(Global.acInputs.highlightedInput.inputInfo.serviceName, Global.acInputs.highlightedInput.inputInfo.deviceInstance) | ||
readonly property bool preferRenewable: preferRenewableEnergy.isValid | ||
readonly property bool preferRenewableOverride: preferRenewableEnergy.value === 0 || preferRenewableEnergy.value === 2 |
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.
Where does the preferRenewableEnergy.value === 2
part come from? In gui-v1, for the preferRenewableOverride
binding, there is only a check for sys.preferRenewableEnergy.value === 0
.
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.
Jesus changed this recently, can you run git pull
and check please?
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.
Ah, I see!
components/widgets/BatteryWidget.qml
Outdated
fillMode: Image.PreserveAspectFit | ||
color: Theme.color_font_primary | ||
visible: root.preferRenewableOverride | ||
source: root.preferRenewableOverrideGenset ? |
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.
If there's nothing after the ?
and :
operators, can you move them to the start of the next line?
source: root.preferRenewableOverrideGenset
? "qrc:/images/icon_charging_generator.svg"
: Global.acInputs.activeInSource === VenusOS.AcInputs_InputSource_Shore
? "qrc:/images/icon_charging_shore.svg"
: "qrc:/images/icon_charging_grid.svg"
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.
done
06fed4b
to
3551103
Compare
Fixes #1325