v2.5.4 - Added radar sweep animation, fixed update issue

This commit is contained in:
Arty Bishop committed 2021-09-17 10:10:20 +01:00
1 parent 4bf2e6c768
commit e6d0671816
9 files changed
+27 -8

No files matched your search

@@ -69,6 +69,7 @@ class PreferencesProvider @Inject constructor(
const val keySources = "prefTleSourcesKey"
const val keyModes = "satModes"
const val keyCompass = "compass"
const val keyRadarSweep = "radarSweep"
const val keyTextLabels = "shouldUseTextLabels"
const val keyTimeUTC = "timeUTC"
const val keyHoursAhead = "hoursAhead"
@@ -156,6 +157,10 @@ class PreferencesProvider @Inject constructor(
return preferences.getBoolean(keyCompass, true)
}
override fun shouldShowSweep(): Boolean {
return preferences.getBoolean(keyRadarSweep, true)
}
override fun isSetupDone(): Boolean {
return preferences.getBoolean(keyInitialSetup, false)
}
@@ -78,6 +78,7 @@ class PassInfoFragment : Fragment(R.layout.fragment_polar) {
setShowAim(preferences.shouldUseCompass())
setPass(pass)
setStationPos(stationPos)
setScanning(preferences.shouldShowSweep())
}
binding.frame.addView(passInfoView)
observeTransmitters(pass, satTransAdapter, binding)
@@ -99,6 +99,10 @@ class PassInfoView(context: Context) : View(context) {
private var pitch: Float = 0f
private var roll: Float = 0f
fun setScanning(isScanning: Boolean) {
shouldShowSweep = isScanning
}
fun setPass(satPass: SatPass) {
this.satPass = satPass
}