summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'android-app/app/src/main/kotlin')
-rw-r--r--android-app/app/src/main/kotlin/org/terst/nav/MainActivity.kt4
-rw-r--r--android-app/app/src/main/kotlin/org/terst/nav/ui/InstrumentHandler.kt8
2 files changed, 6 insertions, 6 deletions
diff --git a/android-app/app/src/main/kotlin/org/terst/nav/MainActivity.kt b/android-app/app/src/main/kotlin/org/terst/nav/MainActivity.kt
index 6197475..023cb94 100644
--- a/android-app/app/src/main/kotlin/org/terst/nav/MainActivity.kt
+++ b/android-app/app/src/main/kotlin/org/terst/nav/MainActivity.kt
@@ -190,9 +190,9 @@ class MainActivity : AppCompatActivity(), SafetyFragment.SafetyListener {
valueDepth = findViewById(R.id.value_depth),
valueBaro = findViewById(R.id.value_baro),
valueCurrSpd = findViewById(R.id.value_curr_spd),
- valueCurrDir = findViewById(R.id.value_curr_dir),
+ valueCurrDir = null,
valueWaveHt = findViewById(R.id.value_wave_ht),
- valueWaveDir = findViewById(R.id.value_wave_dir),
+ valueWaveDir = null,
valueSwellHt = findViewById(R.id.value_swell_ht),
valueSwellPer = findViewById(R.id.value_swell_per)
)
diff --git a/android-app/app/src/main/kotlin/org/terst/nav/ui/InstrumentHandler.kt b/android-app/app/src/main/kotlin/org/terst/nav/ui/InstrumentHandler.kt
index 91582c0..370d8cf 100644
--- a/android-app/app/src/main/kotlin/org/terst/nav/ui/InstrumentHandler.kt
+++ b/android-app/app/src/main/kotlin/org/terst/nav/ui/InstrumentHandler.kt
@@ -15,9 +15,9 @@ class InstrumentHandler(
private val valueDepth: TextView,
private val valueBaro: TextView,
private val valueCurrSpd: TextView,
- private val valueCurrDir: TextView,
+ private val valueCurrDir: TextView?,
private val valueWaveHt: TextView,
- private val valueWaveDir: TextView,
+ private val valueWaveDir: TextView?,
private val valueSwellHt: TextView,
private val valueSwellPer: TextView
) {
@@ -57,9 +57,9 @@ class InstrumentHandler(
swellPer: String? = null
) {
currSpd?.let { valueCurrSpd.text = it }
- currDir?.let { valueCurrDir.text = it }
+ currDir?.let { valueCurrDir?.text = it }
waveHt?.let { valueWaveHt.text = it }
- waveDir?.let { valueWaveDir.text = it }
+ waveDir?.let { valueWaveDir?.text = it }
swellHt?.let { valueSwellHt.text = it }
swellPer?.let { valueSwellPer.text = it }
}