mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-22 20:50:37 +08:00
Fix camera stream
This commit is contained in:
parent
64c7b2e737
commit
cf1dff3fdc
@ -2,6 +2,8 @@
|
|||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
from typing import List, Union, Dict, Optional, Any
|
from typing import List, Union, Dict, Optional, Any
|
||||||
|
|
||||||
|
from PyQt5.QtCore import QUrl
|
||||||
|
|
||||||
from cura.PrinterOutput.PrinterOutputController import PrinterOutputController
|
from cura.PrinterOutput.PrinterOutputController import PrinterOutputController
|
||||||
from cura.PrinterOutput.Models.PrinterOutputModel import PrinterOutputModel
|
from cura.PrinterOutput.Models.PrinterOutputModel import PrinterOutputModel
|
||||||
from .ClusterBuildPlate import ClusterBuildPlate
|
from .ClusterBuildPlate import ClusterBuildPlate
|
||||||
@ -66,6 +68,7 @@ class ClusterPrinterStatus(BaseModel):
|
|||||||
model.updateType(self.machine_variant)
|
model.updateType(self.machine_variant)
|
||||||
model.updateState(self.status if self.enabled else "disabled")
|
model.updateState(self.status if self.enabled else "disabled")
|
||||||
model.updateBuildplate(self.build_plate.type if self.build_plate else "glass")
|
model.updateBuildplate(self.build_plate.type if self.build_plate else "glass")
|
||||||
|
model.setCameraUrl(QUrl(f"http://{self.ip_address}:8080/?action=stream"))
|
||||||
|
|
||||||
for configuration, extruder_output, extruder_config in \
|
for configuration, extruder_output, extruder_config in \
|
||||||
zip(self.configuration, model.extruders, model.printerConfiguration.extruderConfigurations):
|
zip(self.configuration, model.extruders, model.printerConfiguration.extruderConfigurations):
|
||||||
|
@ -87,7 +87,7 @@ class NetworkOutputDevice(UltimakerNetworkedPrinterOutputDevice):
|
|||||||
|
|
||||||
@pyqtSlot(str, name="forceSendJob")
|
@pyqtSlot(str, name="forceSendJob")
|
||||||
def forceSendJob(self, print_job_uuid: str) -> None:
|
def forceSendJob(self, print_job_uuid: str) -> None:
|
||||||
self._cluster_api.forcePrintJob(print_job_uuid)
|
pass # TODO
|
||||||
|
|
||||||
## Set the remote print job state.
|
## Set the remote print job state.
|
||||||
# \param print_job_uuid: The UUID of the print job to set the state for.
|
# \param print_job_uuid: The UUID of the print job to set the state for.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user