-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate info to new ble api #1001
base: makeevrserg/new-ble-api/dev
Are you sure you want to change the base?
Migrate info to new ble api #1001
Conversation
...ents/info/impl/src/main/java/com/flipperdevices/info/impl/viewmodel/DeviceStatusViewModel.kt
Show resolved
Hide resolved
...tlin/com/flipperdevices/bridge/connection/feature/getinfo/impl/api/FGetInfoFeatureApiImpl.kt
Outdated
Show resolved
Hide resolved
.../flipperdevices/bridge/connection/feature/devicecolor/impl/api/FDeviceColorFeatureApiImpl.kt
Outdated
Show resolved
Hide resolved
cdafaf3
to
2e3cb15
Compare
@@ -9,4 +10,5 @@ interface FDevicePersistedStorage { | |||
suspend fun addDevice(device: FDeviceBaseModel) | |||
suspend fun removeDevice(id: String) | |||
fun getAllDevices(): Flow<List<FDeviceBaseModel>> | |||
suspend fun setCurrentDeviceColor(hardwareColor: HardwareColor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not setDeviceColor(id: String, hardwareColor: HardwareColor)
because we can't get color when not connected to device
override val humanReadableName: String = "Flipper $name" | ||
override val humanReadableName: String = "Flipper $name", | ||
@Serializable(HardwareColorSerializer::class) | ||
val hardwareColor: FlipperZeroBle.HardwareColor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be better to add interface ColoredDevice { val hardwareColor....}
but we HardwareColor currently linked specificly to FlipperZero
|
||
enum HardwareColor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locate HardwareColor specifically into FlipeprZeroBle because it's request now linked only for this device model
@@ -99,9 +100,10 @@ class UpdateScreenDecomposeComponent @AssistedInject constructor( | |||
deeplink = deeplink, | |||
deviceStatus = deviceStatus, | |||
connectViewModel = connectViewModel, | |||
hardwareColor = flipperColor, | |||
hardwareColor = HardwareColor.fromValue(flipperColor.value), // TODO change after full migration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some other modules non-related to this PR still requires old HardwareColor
d7793ea
to
08762db
Compare
6554b0c
to
b5bd897
Compare
Background
Migrate main screen module to new api
Changes
Test plan