diff --git a/wear/src/main/AndroidManifest.xml b/wear/src/main/AndroidManifest.xml
index 63dbcc5daa..0a21c75013 100644
--- a/wear/src/main/AndroidManifest.xml
+++ b/wear/src/main/AndroidManifest.xml
@@ -120,31 +120,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/wear/src/main/kotlin/app/aaps/wear/di/WearServicesModule.kt b/wear/src/main/kotlin/app/aaps/wear/di/WearServicesModule.kt
index 72fdae64a8..9a7f137b0f 100644
--- a/wear/src/main/kotlin/app/aaps/wear/di/WearServicesModule.kt
+++ b/wear/src/main/kotlin/app/aaps/wear/di/WearServicesModule.kt
@@ -24,7 +24,6 @@ import app.aaps.wear.watchfaces.AapsV2Watchface
import app.aaps.wear.watchfaces.AapsWatchface
import app.aaps.wear.watchfaces.BigChartWatchface
import app.aaps.wear.watchfaces.CircleWatchface
-import app.aaps.wear.watchfaces.CockpitWatchface
import app.aaps.wear.watchfaces.CustomWatchface
import app.aaps.wear.watchfaces.DigitalStyleWatchface
import app.aaps.wear.watchfaces.NoChartWatchface
@@ -57,7 +56,6 @@ abstract class WearServicesModule {
@ContributesAndroidInjector abstract fun contributesAapsV2Watchface(): AapsV2Watchface
@ContributesAndroidInjector abstract fun contributesAapsLargeWatchface(): AapsLargeWatchface
@ContributesAndroidInjector abstract fun contributesDigitalStyleWatchface(): DigitalStyleWatchface
- @ContributesAndroidInjector abstract fun contributesCockpitWatchface(): CockpitWatchface
@ContributesAndroidInjector abstract fun contributesBIGChart(): BigChartWatchface
@ContributesAndroidInjector abstract fun contributesNOChart(): NoChartWatchface
@ContributesAndroidInjector abstract fun contributesCircleWatchface(): CircleWatchface
diff --git a/wear/src/main/kotlin/app/aaps/wear/watchfaces/CockpitWatchface.kt b/wear/src/main/kotlin/app/aaps/wear/watchfaces/CockpitWatchface.kt
deleted file mode 100644
index 7c0ac08220..0000000000
--- a/wear/src/main/kotlin/app/aaps/wear/watchfaces/CockpitWatchface.kt
+++ /dev/null
@@ -1,78 +0,0 @@
-package app.aaps.wear.watchfaces
-
-import android.view.LayoutInflater
-import android.view.View
-import androidx.viewbinding.ViewBinding
-import app.aaps.wear.R
-import app.aaps.wear.databinding.ActivityCockpitBinding
-import app.aaps.wear.watchfaces.utils.BaseWatchFace
-
-/**
- * Created by andrew-warrington on 18/11/2017.
- * Refactored by MilosKozak 24/04/2022
- */
-class CockpitWatchface : BaseWatchFace() {
-
- private lateinit var binding: ActivityCockpitBinding
-
- override fun inflateLayout(inflater: LayoutInflater): ViewBinding {
- binding = ActivityCockpitBinding.inflate(inflater)
- return binding
- }
-
- override fun setColorDark() {
- binding.mainLayout.setBackgroundResource(R.drawable.airplane_cockpit_outside_clouds)
- setTextSizes()
- val led = when (singleBg.sgvLevel) {
- 1L -> R.drawable.airplane_led_yellow_lit
- 0L -> R.drawable.airplane_led_grey_unlit
- -1L -> R.drawable.airplane_led_red_lit
- else -> R.drawable.airplane_led_grey_unlit
- }
-
- binding.highLight.setBackgroundResource(led)
- binding.lowLight.setBackgroundResource(led)
-
- when (loopLevel) {
- -1 -> binding.loop.setBackgroundResource(R.drawable.loop_grey_25)
- 1 -> binding.loop.setBackgroundResource(R.drawable.loop_green_25)
- else -> binding.loop.setBackgroundResource(R.drawable.loop_red_25)
- }
- invalidate()
- }
-
- override fun setColorLowRes() {
- binding.mainLayout.setBackgroundResource(R.drawable.airplane_cockpit_outside_clouds_lowres)
- }
-
- override fun setColorBright() {
- setColorDark()
- }
-
- private fun setTextSizes() {
- if (detailedIob) {
- if (bIsRound) binding.iob2.textSize = 10f
- else binding.iob2.textSize = 9f
- } else {
- if (bIsRound) binding.iob2.textSize = 13f
- else binding.iob2.textSize = 12f
- }
- if (binding.uploaderBattery.visibility != View.GONE && binding.rigBattery.visibility != View.GONE) {
- if (bIsRound) {
- binding.uploaderBattery.textSize = 12f
- binding.rigBattery.textSize = 12f
- } else {
- binding.uploaderBattery.textSize = 10f
- binding.rigBattery.textSize = 10f
- }
- } else {
- if (bIsRound) {
- binding.uploaderBattery.textSize = 13f
- binding.rigBattery.textSize = 13f
- } else {
- binding.uploaderBattery.textSize = 12f
- binding.rigBattery.textSize = 12f
- }
- }
- }
-}
diff --git a/wear/src/main/kotlin/app/aaps/wear/watchfaces/utils/WatchfaceViewAdapter.kt b/wear/src/main/kotlin/app/aaps/wear/watchfaces/utils/WatchfaceViewAdapter.kt
index 692eec4977..18c06f1ef1 100644
--- a/wear/src/main/kotlin/app/aaps/wear/watchfaces/utils/WatchfaceViewAdapter.kt
+++ b/wear/src/main/kotlin/app/aaps/wear/watchfaces/utils/WatchfaceViewAdapter.kt
@@ -2,7 +2,6 @@ package app.aaps.wear.watchfaces.utils
import androidx.viewbinding.ViewBinding
import app.aaps.wear.databinding.ActivityBigchartBinding
-import app.aaps.wear.databinding.ActivityCockpitBinding
import app.aaps.wear.databinding.ActivityCustomBinding
import app.aaps.wear.databinding.ActivityDigitalstyleBinding
import app.aaps.wear.databinding.ActivityHome2Binding
@@ -19,14 +18,13 @@ class WatchfaceViewAdapter(
a2: ActivityHome2Binding? = null,
aa: ActivityHomeBinding? = null,
bC: ActivityBigchartBinding? = null,
- cp: ActivityCockpitBinding? = null,
ds: ActivityDigitalstyleBinding? = null,
nC: ActivityNochartBinding? = null,
cU: ActivityCustomBinding? = null
) {
init {
- if (aL == null && a2 == null && aa == null && bC == null && cp == null && ds == null && nC == null && cU == null) {
+ if (aL == null && a2 == null && aa == null && bC == null && ds == null && nC == null && cU == null) {
throw IllegalArgumentException("Require at least on Binding parameter")
}
}
@@ -35,36 +33,36 @@ class WatchfaceViewAdapter(
// Required attributes
val mainLayout =
- aL?.mainLayout ?: a2?.mainLayout ?: aa?.mainLayout ?: bC?.mainLayout ?: bC?.mainLayout ?: cp?.mainLayout ?: ds?.mainLayout ?: nC?.mainLayout ?: cU?.mainLayout
+ aL?.mainLayout ?: a2?.mainLayout ?: aa?.mainLayout ?: bC?.mainLayout ?: bC?.mainLayout ?: ds?.mainLayout ?: nC?.mainLayout ?: cU?.mainLayout
?: throw IllegalArgumentException(errorMessage)
val timestamp =
- aL?.timestamp ?: a2?.timestamp ?: aa?.timestamp ?: bC?.timestamp ?: bC?.timestamp ?: cp?.timestamp ?: ds?.timestamp ?: nC?.timestamp ?: cU?.timestamp
+ aL?.timestamp ?: a2?.timestamp ?: aa?.timestamp ?: bC?.timestamp ?: bC?.timestamp ?: ds?.timestamp ?: nC?.timestamp ?: cU?.timestamp
?: throw IllegalArgumentException(errorMessage)
val root =
- aL?.root ?: a2?.root ?: aa?.root ?: bC?.root ?: bC?.root ?: cp?.root ?: ds?.root ?: nC?.root ?: cU?.root
+ aL?.root ?: a2?.root ?: aa?.root ?: bC?.root ?: bC?.root ?: ds?.root ?: nC?.root ?: cU?.root
?: throw IllegalArgumentException(errorMessage)
// Optional attributes
- val sgv = aL?.sgv ?: a2?.sgv ?: aa?.sgv ?: bC?.sgv ?: bC?.sgv ?: cp?.sgv ?: ds?.sgv ?: nC?.sgv ?: cU?.sgv
- val direction = aL?.direction ?: a2?.direction ?: aa?.direction ?: cp?.direction ?: ds?.direction
- val loop = a2?.loop ?: cp?.loop ?: cU?.loop
- val delta = aL?.delta ?: a2?.delta ?: aa?.delta ?: bC?.delta ?: bC?.delta ?: cp?.delta ?: ds?.delta ?: nC?.delta ?: cU?.delta
- val avgDelta = a2?.avgDelta ?: bC?.avgDelta ?: bC?.avgDelta ?: cp?.avgDelta ?: ds?.avgDelta ?: nC?.avgDelta ?: cU?.avgDelta
- val uploaderBattery = aL?.uploaderBattery ?: a2?.uploaderBattery ?: aa?.uploaderBattery ?: cp?.uploaderBattery ?: ds?.uploaderBattery ?: cU?.uploaderBattery
- val rigBattery = a2?.rigBattery ?: cp?.rigBattery ?: ds?.rigBattery ?: cU?.rigBattery
- val basalRate = a2?.basalRate ?: cp?.basalRate ?: ds?.basalRate ?: cU?.basalRate
+ val sgv = aL?.sgv ?: a2?.sgv ?: aa?.sgv ?: bC?.sgv ?: bC?.sgv ?: ds?.sgv ?: nC?.sgv ?: cU?.sgv
+ val direction = aL?.direction ?: a2?.direction ?: aa?.direction ?: ds?.direction
+ val loop = a2?.loop ?: cU?.loop
+ val delta = aL?.delta ?: a2?.delta ?: aa?.delta ?: bC?.delta ?: bC?.delta ?: ds?.delta ?: nC?.delta ?: cU?.delta
+ val avgDelta = a2?.avgDelta ?: bC?.avgDelta ?: bC?.avgDelta ?: ds?.avgDelta ?: nC?.avgDelta ?: cU?.avgDelta
+ val uploaderBattery = aL?.uploaderBattery ?: a2?.uploaderBattery ?: aa?.uploaderBattery ?: ds?.uploaderBattery ?: cU?.uploaderBattery
+ val rigBattery = a2?.rigBattery ?: ds?.rigBattery ?: cU?.rigBattery
+ val basalRate = a2?.basalRate ?: ds?.basalRate ?: cU?.basalRate
val bgi = a2?.bgi ?: ds?.bgi ?: cU?.bgi
- val AAPSv2 = a2?.AAPSv2 ?: cp?.AAPSv2 ?: ds?.AAPSv2 ?: cU?.AAPSv2
+ val AAPSv2 = a2?.AAPSv2 ?: ds?.AAPSv2 ?: cU?.AAPSv2
val cob1 = a2?.cob1 ?: ds?.cob1 ?: cU?.cob1
- val cob2 = a2?.cob2 ?: cp?.cob2 ?: ds?.cob2 ?: cU?.cob2
- val time = aL?.time ?: a2?.time ?: aa?.time ?: bC?.time ?: bC?.time ?: cp?.time ?: nC?.time ?: cU?.time
+ val cob2 = a2?.cob2 ?: ds?.cob2 ?: cU?.cob2
+ val time = aL?.time ?: a2?.time ?: aa?.time ?: bC?.time ?: bC?.time ?: nC?.time ?: cU?.time
val second = cU?.second
val minute = ds?.minute ?: cU?.minute
val hour = ds?.hour ?: cU?.hour
val day = a2?.day ?: ds?.day ?: cU?.day
val month = a2?.month ?: ds?.month ?: cU?.month
val iob1 = a2?.iob1 ?: ds?.iob1 ?: cU?.iob1
- val iob2 = a2?.iob2 ?: cp?.iob2 ?: ds?.iob2 ?: cU?.iob2
+ val iob2 = a2?.iob2 ?: ds?.iob2 ?: cU?.iob2
val chart = a2?.chart ?: aa?.chart ?: bC?.chart ?: bC?.chart ?: ds?.chart ?: cU?.chart
val status = aL?.status ?: aa?.status ?: bC?.status ?: bC?.status ?: nC?.status
val timePeriod = ds?.timePeriod ?: aL?.timePeriod ?: nC?.timePeriod ?: bC?.timePeriod ?: cU?.timePeriod
@@ -76,8 +74,6 @@ class WatchfaceViewAdapter(
// val minuteHand = cU?.minuteHand
// val secondaryLayout = aL?.secondaryLayout ?: a2?.secondaryLayout ?: aa?.secondaryLayout ?: ds?.secondaryLayout
// val tertiaryLayout = a2?.tertiaryLayout
- // val highLight = cp?.highLight
- // val lowLight = cp?.lowLight
// val hourHand = cU?.hourHand
companion object {
@@ -88,10 +84,9 @@ class WatchfaceViewAdapter(
is ActivityHome2Binding -> WatchfaceViewAdapter(null, bindLayout)
is ActivityHomeBinding -> WatchfaceViewAdapter(null, null, bindLayout)
is ActivityBigchartBinding -> WatchfaceViewAdapter(null, null, null, bindLayout)
- is ActivityCockpitBinding -> WatchfaceViewAdapter(null, null, null, null, bindLayout)
- is ActivityDigitalstyleBinding -> WatchfaceViewAdapter(null, null, null, null, null, bindLayout)
- is ActivityNochartBinding -> WatchfaceViewAdapter(null, null, null, null, null, null, bindLayout)
- is ActivityCustomBinding -> WatchfaceViewAdapter(null, null, null, null, null, null, null, bindLayout)
+ is ActivityDigitalstyleBinding -> WatchfaceViewAdapter(null, null, null, null, bindLayout)
+ is ActivityNochartBinding -> WatchfaceViewAdapter(null, null, null, null, null, bindLayout)
+ is ActivityCustomBinding -> WatchfaceViewAdapter(null, null, null, null, null, null, bindLayout)
else -> throw IllegalArgumentException("ViewBinding is not implement in WatchfaceViewAdapter")
}
}
diff --git a/wear/src/main/res/drawable/airplane_cockpit.png b/wear/src/main/res/drawable/airplane_cockpit.png
deleted file mode 100644
index 84da13abc7..0000000000
Binary files a/wear/src/main/res/drawable/airplane_cockpit.png and /dev/null differ
diff --git a/wear/src/main/res/drawable/airplane_cockpit_outside_clouds.png b/wear/src/main/res/drawable/airplane_cockpit_outside_clouds.png
deleted file mode 100644
index dca7e49079..0000000000
Binary files a/wear/src/main/res/drawable/airplane_cockpit_outside_clouds.png and /dev/null differ
diff --git a/wear/src/main/res/drawable/airplane_cockpit_outside_clouds_lowres.png b/wear/src/main/res/drawable/airplane_cockpit_outside_clouds_lowres.png
deleted file mode 100644
index e264408816..0000000000
Binary files a/wear/src/main/res/drawable/airplane_cockpit_outside_clouds_lowres.png and /dev/null differ
diff --git a/wear/src/main/res/drawable/airplane_led_grey_unlit.png b/wear/src/main/res/drawable/airplane_led_grey_unlit.png
deleted file mode 100644
index 614510d717..0000000000
Binary files a/wear/src/main/res/drawable/airplane_led_grey_unlit.png and /dev/null differ
diff --git a/wear/src/main/res/drawable/airplane_led_red_lit.png b/wear/src/main/res/drawable/airplane_led_red_lit.png
deleted file mode 100644
index 9f4d98073d..0000000000
Binary files a/wear/src/main/res/drawable/airplane_led_red_lit.png and /dev/null differ
diff --git a/wear/src/main/res/drawable/airplane_led_yellow_lit.png b/wear/src/main/res/drawable/airplane_led_yellow_lit.png
deleted file mode 100644
index cca76f6b2a..0000000000
Binary files a/wear/src/main/res/drawable/airplane_led_yellow_lit.png and /dev/null differ
diff --git a/wear/src/main/res/drawable/watchface_cockpit.png b/wear/src/main/res/drawable/watchface_cockpit.png
deleted file mode 100644
index 88f7bb70a3..0000000000
Binary files a/wear/src/main/res/drawable/watchface_cockpit.png and /dev/null differ
diff --git a/wear/src/main/res/layout/activity_cockpit.xml b/wear/src/main/res/layout/activity_cockpit.xml
deleted file mode 100644
index a9f148c673..0000000000
--- a/wear/src/main/res/layout/activity_cockpit.xml
+++ /dev/null
@@ -1,444 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/wear/src/main/res/values/strings.xml b/wear/src/main/res/values/strings.xml
index 2b21dcbc16..6599af1430 100644
--- a/wear/src/main/res/values/strings.xml
+++ b/wear/src/main/res/values/strings.xml
@@ -8,8 +8,6 @@
AAPS(NoChart)
AAPS(Circle)
AAPS(v2)
- AAPS(Cockpit)
- AAPS(Steampunk)
AAPS(DigitalStyle)
AAPS(Custom)
AAPS(Actions)
@@ -62,7 +60,6 @@
Quick righty
Quick lefty
Modern Sparse
- Delta Granularity (Steampunk)
Low
Medium
High
@@ -243,8 +240,6 @@
lowcolor
increment
decrement
- H
- L
avg
--U
--g
diff --git a/wear/src/main/res/xml/watch_face_configuration_cockpit.xml b/wear/src/main/res/xml/watch_face_configuration_cockpit.xml
deleted file mode 100644
index c6a75d256e..0000000000
--- a/wear/src/main/res/xml/watch_face_configuration_cockpit.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-