feat: implement telemetry persistence, data visualization, and improved bluetooth stream parsing with frame statistics #10
Generated
+26
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AppInsightsSettings">
|
||||||
|
<option name="tabSettings">
|
||||||
|
<map>
|
||||||
|
<entry key="Firebase Crashlytics">
|
||||||
|
<value>
|
||||||
|
<InsightsFilterSettings>
|
||||||
|
<option name="connection">
|
||||||
|
<ConnectionSetting>
|
||||||
|
<option name="appId" value="PLACEHOLDER" />
|
||||||
|
<option name="mobileSdkAppId" value="" />
|
||||||
|
<option name="projectId" value="" />
|
||||||
|
<option name="projectNumber" value="" />
|
||||||
|
</ConnectionSetting>
|
||||||
|
</option>
|
||||||
|
<option name="signal" value="SIGNAL_UNSPECIFIED" />
|
||||||
|
<option name="timeIntervalDays" value="THIRTY_DAYS" />
|
||||||
|
<option name="visibilityType" value="ALL" />
|
||||||
|
</InsightsFilterSettings>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+1
@@ -4,6 +4,7 @@
|
|||||||
<option name="approvalStates">
|
<option name="approvalStates">
|
||||||
<map>
|
<map>
|
||||||
<entry key="20260611-222122-a9e9a066-af5b-42dc-aff4-518967db385e" value="false" />
|
<entry key="20260611-222122-a9e9a066-af5b-42dc-aff4-518967db385e" value="false" />
|
||||||
|
<entry key="736035b4-cfea-4311-a3cb-e5170b1c7e0a" value="false" />
|
||||||
</map>
|
</map>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ import com.example.esp32aldldashboard.bluetooth.ConnectionState
|
|||||||
import com.example.esp32aldldashboard.parser.ALDLFrame
|
import com.example.esp32aldldashboard.parser.ALDLFrame
|
||||||
import com.example.esp32aldldashboard.repository.SettingsRepository
|
import com.example.esp32aldldashboard.repository.SettingsRepository
|
||||||
import com.example.esp32aldldashboard.repository.TelemetryRepository
|
import com.example.esp32aldldashboard.repository.TelemetryRepository
|
||||||
|
import kotlinx.coroutines.flow.SharingStarted
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
|
import kotlinx.coroutines.flow.stateIn
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
class MainScreenViewModel(
|
class MainScreenViewModel(
|
||||||
@@ -24,10 +26,11 @@ class MainScreenViewModel(
|
|||||||
val currentFrameRate: StateFlow<Int> = telemetryRepository.currentFrameRate
|
val currentFrameRate: StateFlow<Int> = telemetryRepository.currentFrameRate
|
||||||
|
|
||||||
val isCelsius: StateFlow<Boolean> = settingsRepository.isCelsiusFlow
|
val isCelsius: StateFlow<Boolean> = settingsRepository.isCelsiusFlow
|
||||||
|
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5000), false)
|
||||||
|
|
||||||
fun toggleTemperatureUnit() {
|
fun toggleTemperatureUnit() {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
val currentValue = settingsRepository.isCelsiusFlow.value
|
val currentValue = isCelsius.value
|
||||||
settingsRepository.setIsCelsius(!currentValue)
|
settingsRepository.setIsCelsius(!currentValue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user