Add NWBrowser and NWConnection code.

TODO: Refactor all of this stuff better
This commit is contained in:
Madeline
2023-02-08 20:19:23 -05:00
parent dd4324e395
commit 5f429b8cb4
9 changed files with 293 additions and 148 deletions

View File

@@ -17,9 +17,33 @@ struct ResultsData: Decodable {
}
struct StatusData: Decodable {
let virtual_sdcard: VirtualSDCardData
let extruder: ExtruderData
let print_stats: PrintStatsData
let heater_bed: HeaterBedData
}
struct VirtualSDCardData: Decodable {
let file_path: String?
let progress: Double
let is_active: Bool
}
struct ExtruderData: Decodable {
let temperature: Double
let target: Double
let power: Double
}
struct PrintStatsData: Decodable {
let filename: String
let print_duration: Double
let filament_used: Double
let state: String
}
struct HeaterBedData: Decodable {
let temperature: Double
let target: Double
let power: Double
}