Example #1
0
 def __init__(self, sendQueue):
     print("Peripherals initialization")
     self.matrix = matrix_control.MatrixControl(sendQueue)
     self.led = led_control.LedControl(sendQueue)
     self.audio = pumpkin_audio.PumpkinAudio(sendQueue)
     self.temperature = temperature_reader.TemperatureSensor(sendQueue)
     self.camera = camera_control.CameraControl(sendQueue)
Example #2
0
    def __init__(self, cont):
        self.debug = False
        self.console = True
        self.cont = cont
        self.own = cont.owner
        self.scene = cont.owner.scene
        self.input = game_input.GameInput()
        self.camera = camera_control.CameraControl(self)
        self.context = "PAN"
        self.mouse_timer = 6
        self.mouse_refresh = 6

        self.select_point = None
        self.movement_action = None
        self.debug_message = ""
        self.paused = False
        self.selected_agents = []

        self.level_size = 64
        self.terrain = None
        self.tiles = {}

        self.dynamic_lights = [
            ob for ob in self.scene.objects if ob.get("dynamic_light")
        ]
        self.lights = []
        self.agents = []
        self.waypoints = None
        self.particles = []
        self.LOS_manager = None

        self.UI_orders = []
        self.UI_mouse_over = False

        self.cursor_refresh = 0.0
        self.tile_over = None
        self.mouse_over_unit = None

        self.debug_timer = {}

        self.state_name = None
        self.state = game_states.PrepGame(self)
Example #3
0
                               QtCore.Qt.KeepAspectRatio)  # Scale pixmap
        self.camera1ImageLbl.setPixmap(pixmap)  # Set the pixmap onto the label
        pixmap = pixmap.scaled(self.camera2ImageLbl.width(),
                               self.camera2ImageLbl.height(),
                               QtCore.Qt.KeepAspectRatio)  # Scale pixmap
        self.camera2ImageLbl.setPixmap(pixmap)  # Set the pixmap onto the label
        pixmap = pixmap.scaled(self.camera3ImageLbl.width(),
                               self.camera3ImageLbl.height(),
                               QtCore.Qt.KeepAspectRatio)  # Scale pixmap
        self.camera3ImageLbl.setPixmap(pixmap)  # Set the pixmap onto the label
        cmnd_q.put(STOP_CMND)
        self.cur_cmnd = STOP_CMND

    def quit(self):
        cmnd_q.put(QUIT_CMND)
        app.quit()


if __name__ == "__main__":
    import sys

    cam_ctl = camera_control.CameraControl(cmnd_q, status_q)
    cam_ctl.start()

    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())