From ad2fb3063cd344ed0506fc7b95a81ecd78a522a3 Mon Sep 17 00:00:00 2001 From: Johan von Forstner <5310424+johan12345@users.noreply.github.com> Date: Sat, 9 Jul 2022 20:52:52 +0200 Subject: [PATCH] Chargeprice: fix average charge speed Now calculated as energy / duration Fixes #171 --- app/src/main/res/layout/fragment_chargeprice.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/layout/fragment_chargeprice.xml b/app/src/main/res/layout/fragment_chargeprice.xml index 1641dfba..838f8c99 100644 --- a/app/src/main/res/layout/fragment_chargeprice.xml +++ b/app/src/main/res/layout/fragment_chargeprice.xml @@ -107,7 +107,7 @@ android:id="@+id/textView4" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@{@string/chargeprice_stats(vm.chargepriceMetaForChargepoint.data.energy, BindingAdaptersKt.time((int) Math.round(vm.chargepriceMetaForChargepoint.data.duration)), vm.chargepriceMetaForChargepoint.data.power)}" + android:text="@{@string/chargeprice_stats(vm.chargepriceMetaForChargepoint.data.energy, BindingAdaptersKt.time((int) Math.round(vm.chargepriceMetaForChargepoint.data.duration)), vm.chargepriceMetaForChargepoint.data.energy / vm.chargepriceMetaForChargepoint.data.duration * 60)}" android:textAppearance="@style/TextAppearance.Material3.BodySmall" app:invisibleUnlessAnimated="@{!vm.batteryRangeSliderDragging && vm.chargepriceMetaForChargepoint.status == Status.SUCCESS}" app:layout_constraintStart_toStartOf="@+id/textView2" @@ -242,4 +242,4 @@ - \ No newline at end of file +