Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ body>.container-fluid {
--color-fg: black;
--color-scale: lightgrey;
--color-title: rgba(0, 0, 0, 0.644);
--color-config: lightgrey;
--padding-widget: 5px;
--fontCol: rgba(255, 255, 255, 0.82);
--gridCol: rgba(255, 255, 255, 0.82);
Expand All @@ -244,6 +245,7 @@ body>.container-fluid {
--color-fg: white;
--color-scale: steelblue;
--color-title: lightgrey;
--color-config: steelblue;
--padding-widget: 0px;
}

Expand All @@ -258,6 +260,7 @@ body>.container-fluid {
--color-fg: white;
--color-scale: #999999;
--color-title: lightgrey;
--color-config: #666666;
--padding-widget: 0px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function processCounterMessages(topic: string, message: string) {
if (id != undefined) {
if (id == globalData.evuId) {
processEvuMessages(topic, message)
}
}
if (!counters.has(id)) {
console.warn('Invalid counter index: ' + id)
} else if (topic.match(/^openWB\/counter\/[0-9]+\/get\/power$/i)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
v-if="chargepoint.isSocManual"
class="fa-solid fa-sm fas fa-edit"
:style="{ color: 'var(--color-bg)' }"
@click="editSoc = !editSoc"
@click="toggleSocEditor()"
/>

<i
Expand Down Expand Up @@ -99,7 +99,7 @@
<span>
<RangeInput
id="manualSoc"
v-model="manualSoc"
v-model="tempsoc"
:min="0"
:max="100"
:step="1"
Expand Down Expand Up @@ -215,15 +215,7 @@ const chargedRangeString = computed(() => {
const soc = computed(() => {
return props.chargepoint.soc
})
const manualSoc = computed({
get() {
return props.chargepoint.soc
},
set(s: number) {
chargePoints[props.chargepoint.id].soc = s
},
})

const tempsoc = ref(0)
const currentPrice = computed(() => {
const [p] = etData.etPriceList.values()
return (Math.round(p * 10) / 10).toFixed(1)
Expand Down Expand Up @@ -264,9 +256,18 @@ function loadSoc() {
chargePoints[props.chargepoint.id].waitingForSoc = true
}
function setSoc() {
updateServer('setSoc', manualSoc.value, props.chargepoint.connectedVehicle)
//updateServer('setSoc', manualSoc.value, props.chargepoint.connectedVehicle)
updateServer('setSoc', tempsoc.value, props.chargepoint.connectedVehicle)
editSoc.value = false
}
function toggleSocEditor() {
if (editSoc.value) {
editSoc.value = false
} else {
tempsoc.value = props.chargepoint.soc
editSoc.value = true
}
}
</script>
<style scoped>
.fa-star {
Expand Down
Loading