Skip to content

Commit

Permalink
🚚 (RobotKit): Move ConnectedRobotInformationViewModel to RobotKit
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Nov 9, 2023
1 parent 806772d commit 78a0701
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: Apache-2.0

import Combine
import RobotKit
import SwiftUI

struct ConnectedRobotInformationView: View {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@
// SPDX-License-Identifier: Apache-2.0

import Combine
import RobotKit
import SwiftUI

class ConnectedRobotInformationViewModel: ObservableObject {
public class ConnectedRobotInformationViewModel: ObservableObject {

@Published var name: String = "(n/a)"
@Published var serialNumber: String = "(n/a)"
@Published var osVersion: String = "(n/a)"
@Published public var name: String = "(n/a)"
@Published public var serialNumber: String = "(n/a)"
@Published public var osVersion: String = "(n/a)"

@Published var battery: Int = 0
@Published var isCharging: Bool = false
@Published public var battery: Int = 0
@Published public var isCharging: Bool = false

let robot = Robot.shared

private var cancellables: Set<AnyCancellable> = []

init() {
public init() {
getRobotInformation()
}

Expand Down

0 comments on commit 78a0701

Please sign in to comment.