FlashFirmware#

class QPolargraph.FlashFirmware.FlashDialog(parent=None, message=None)[source]#

Bases: QDialog

Dialog to detect an attached Arduino and flash the acam3 firmware.

Enumerates serial ports using QSerialPortInfo, filters by known Arduino USB vendor IDs, and delegates the three-step flash sequence (library install, compile, upload) to a background _FlashWorker thread. Requires arduino-cli to be installed and on PATH.

Parameters:
  • parent (QtWidgets.QWidget, optional) – Parent widget.

  • message (str, optional) – Explanatory text shown above the form. Use this when the dialog is opened automatically (e.g. because no acam3 device was found) so the user understands why it appeared.

QPolargraph.FlashFirmware.find_arduinos()[source]#

Return serial ports whose USB vendor ID matches a known Arduino VID.

Return type:

list[QSerialPortInfo]