Change PRM to MoonrakerSocketManager, project update
This commit is contained in:
		
							
								
								
									
										0
									
								
								Soyuz/Assets.xcassets/AccentColor.colorset/Contents.json
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								Soyuz/Assets.xcassets/AccentColor.colorset/Contents.json
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										0
									
								
								Soyuz/Assets.xcassets/AppIcon.appiconset/Contents.json
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								Soyuz/Assets.xcassets/AppIcon.appiconset/Contents.json
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										0
									
								
								Soyuz/Assets.xcassets/Contents.json
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								Soyuz/Assets.xcassets/Contents.json
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										0
									
								
								Soyuz/Info.plist
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								Soyuz/Info.plist
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										0
									
								
								Soyuz/KlipperMon.xcdatamodeld/.xccurrentversion
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								Soyuz/KlipperMon.xcdatamodeld/.xccurrentversion
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										0
									
								
								Soyuz/KlipperMon.xcdatamodeld/KlipperMon.xcdatamodel/contents
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								Soyuz/KlipperMon.xcdatamodeld/KlipperMon.xcdatamodel/contents
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										0
									
								
								Soyuz/Persistence.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								Soyuz/Persistence.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										0
									
								
								Soyuz/Preview Content/Preview Assets.xcassets/Contents.json
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								Soyuz/Preview Content/Preview Assets.xcassets/Contents.json
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										0
									
								
								Soyuz/Soyuz.entitlements
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								Soyuz/Soyuz.entitlements
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										2
									
								
								Soyuz/SoyuzApp.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										2
									
								
								Soyuz/SoyuzApp.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -13,7 +13,7 @@ struct SoyuzApp: App {
 | 
			
		||||
    
 | 
			
		||||
    @State var currentIcon = "move.3d"
 | 
			
		||||
    
 | 
			
		||||
    @ObservedObject static var printerManager = PrinterRequestManager()
 | 
			
		||||
    @ObservedObject static var printerManager = MoonrakerSocketManager()
 | 
			
		||||
    
 | 
			
		||||
    var body: some Scene {
 | 
			
		||||
//        WindowGroup(id: "floating-stats") {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										0
									
								
								Soyuz/ViewModels/BonjourBrowser.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								Soyuz/ViewModels/BonjourBrowser.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										2
									
								
								Soyuz/ViewModels/PrinterRequestManager.swift → Soyuz/ViewModels/MoonrakerSocketManager.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										2
									
								
								Soyuz/ViewModels/PrinterRequestManager.swift → Soyuz/ViewModels/MoonrakerSocketManager.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -13,7 +13,7 @@ import Starscream
 | 
			
		||||
 | 
			
		||||
// MARK: PrinterRequestManager
 | 
			
		||||
//@MainActor
 | 
			
		||||
class PrinterRequestManager: ObservableObject, WebSocketDelegate {
 | 
			
		||||
class MoonrakerSocketManager: ObservableObject, WebSocketDelegate {
 | 
			
		||||
    let WEBSOCKET_TIMEOUT_INTERVAL: TimeInterval = 60.0
 | 
			
		||||
    
 | 
			
		||||
    // Websocket JSON-RPC published data
 | 
			
		||||
							
								
								
									
										0
									
								
								Soyuz/ViewModels/PrinterObjectsQuery.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								Soyuz/ViewModels/PrinterObjectsQuery.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										4
									
								
								Soyuz/Views/PrinterConfigView.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										4
									
								
								Soyuz/Views/PrinterConfigView.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -10,7 +10,7 @@ import Network
 | 
			
		||||
 | 
			
		||||
// MARK: PrinterConfigView
 | 
			
		||||
struct PrinterConfigView: View {
 | 
			
		||||
    @ObservedObject var printerManager: PrinterRequestManager
 | 
			
		||||
    @ObservedObject var printerManager: MoonrakerSocketManager
 | 
			
		||||
    @ObservedObject var bonjourBrowser = BonjourBrowser()
 | 
			
		||||
    
 | 
			
		||||
    var body: some View {
 | 
			
		||||
@@ -54,7 +54,7 @@ struct PrinterConfigView: View {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct PrinterConfigView_Previews: PreviewProvider {
 | 
			
		||||
    @State static var printerManager = PrinterRequestManager()
 | 
			
		||||
    @State static var printerManager = MoonrakerSocketManager()
 | 
			
		||||
    
 | 
			
		||||
    static var previews: some View {
 | 
			
		||||
        PrinterConfigView(printerManager: printerManager)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								Soyuz/Views/SoyuzMenuBarExtraView.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										5
									
								
								Soyuz/Views/SoyuzMenuBarExtraView.swift
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -11,11 +11,12 @@ import Network
 | 
			
		||||
 | 
			
		||||
struct SoyuzMenuBarExtraView: View {
 | 
			
		||||
    // The threshhold considered a burn-risk, at which point certain UI elements turn red.
 | 
			
		||||
    // Measured in degrees Celsius
 | 
			
		||||
    let DANGERTEMP = 40.0
 | 
			
		||||
    
 | 
			
		||||
    @Environment(\.openWindow) var openWindow
 | 
			
		||||
    
 | 
			
		||||
    @ObservedObject var printerManager: PrinterRequestManager
 | 
			
		||||
    @ObservedObject var printerManager: MoonrakerSocketManager
 | 
			
		||||
    
 | 
			
		||||
    @State var printPercentage: Double = 0
 | 
			
		||||
    
 | 
			
		||||
@@ -100,7 +101,7 @@ struct SoyuzMenuBarExtraView: View {
 | 
			
		||||
 | 
			
		||||
struct KlipperMonMenuBarExtraView_Previews: PreviewProvider {
 | 
			
		||||
    @State static var currentMenuBarIcon = "move.3d"
 | 
			
		||||
    @State static var printerManager = PrinterRequestManager()
 | 
			
		||||
    @State static var printerManager = MoonrakerSocketManager()
 | 
			
		||||
    
 | 
			
		||||
    static var previews: some View {
 | 
			
		||||
        SoyuzMenuBarExtraView(printerManager: printerManager, currentMenuBarIcon: $currentMenuBarIcon)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user