mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Simplified BluetoothReporter and NetworkReporter
This commit is contained in:
1 parent
e523eb5517
commit
706c912b13
6 files changed
+179
-214
No files matched your search
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
|
||||
+3
-14
@@ -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 }
|
||||
Reference in new issue
Block a user