sivicncdriver.serial package¶
Submodules¶
sivicncdriver.serial.serial_list module¶
sivicncdriver.serial.serial_manager module¶
The serial_manager module¶
Provides a class to handle the CNC machine through a serial object.
-
class
sivicncdriver.serial.serial_manager.
SerialManager
(serial, fake_mode=False)[source]¶ Bases:
PyQt5.QtCore.QObject
A class to manage the serial port.
It will try to send what it receive and send via the send_print signal. When it receive a ‘ok’ from the serial it will send the send_confirm signal.
-
open
(baudrate, serial_port, timeout)[source]¶ Opens the serial port with the given parameters.
Parameters: - baudrate – The baudrate.
- serial_port – The port to be used.
- timeout – Timeout for reading and writing.
-
readMsg
()[source]¶ Reads a line from the serial port. And emit the send_print or send_confirm signals if necessary.
-
sendMsg
(msg)[source]¶ Sends a message using the serial port if fake_mode is False.
Parameters: msg – The message to be sent. Returns: True if no error occurred, else False.
-
send_confirm
¶
-
send_print
¶
-
serial_fatal_error
¶
-
sivicncdriver.serial.thread_read module¶
sivicncdriver.serial.thread_send module¶
-
class
sivicncdriver.serial.thread_send.
SendThread
(serial_manager, gcode)[source]¶ Bases:
PyQt5.QtCore.QThread
A thread to send a list of instructions without blocking the main thread.
-
run
()[source]¶ Runs the thread.
The commands are sent using the serial manager. If an error occurs or if the thread is stopped by the user, then it quits.
-
read_allowed
¶
-
update_progress
¶
-