Simplified BluetoothReporter and NetworkReporter

This commit is contained in:
Arty Bishop committed 2026-03-30 22:02:49 +01:00
1 parent e523eb5517
commit 706c912b13
6 files changed
+179 -214

No files matched your search

@@ -12,8 +12,8 @@ interface IMainContainer {
val databaseRepo: IDatabaseRepo
fun provideAddToCalendar(): IAddToCalendar
fun provideShowToast(): IShowToast
fun provideBluetoothReporter(): IReporterRepo<WithoutExtParams>
fun provideNetworkReporter(): IReporterRepo<ExtendedParams>
fun provideBluetoothReporter(): IReporter
fun provideNetworkReporter(): IReporter
fun provideSensorsRepo(): ISensorsRepo
}
@@ -17,18 +17,7 @@
*/
package com.rtbishop.look4sat.core.domain.repository
interface IReporterParams
interface IReporterRepo<T : IReporterParams> {
fun isConnected(service: BtService): Boolean
fun isConnecting(service: BtService): Boolean
fun connect(service: BtService, deviceId: String)
fun reportRotation(format: String, azimuth: Double, elevation: Double, params: T)
fun reportFrequency(format: String, frequency: Long, params: T)
interface IReporter {
fun reportRotation(format: String, azimuth: Double, elevation: Double)
fun reportFrequency(format: String, frequency: Long)
}
data class ExtendedParams(val server: String, val port: Int) : IReporterParams
data class WithoutExtParams(val dummy: Int) : IReporterParams
enum class BtService { ROTATOR, FREQUENCY }