vlachoudis / bCNC

GRBL CNC command sender, autoleveler and g-code editor
GNU General Public License v2.0
1.54k stars 528 forks source link

Corrected camera index reading from config when multiple webcams #1886

Open muaddibus opened 2 months ago

muaddibus commented 2 months ago

Corrected camera index reading from config when multiple webcams It was opening device index 0, regardless saved setting.

Harvie commented 2 months ago

Thanks for noticing this. What was the "prefix" variable used for originaly?

muaddibus commented 2 months ago

Didnt found it to be used anywhere.

Harvie commented 2 months ago

Didnt found it to be used anywhere.

What?

image

muaddibus commented 2 months ago

I misunderstood you. I ment i didnt fount self.idx variable used except for setting video capture device number, which is originally always set to zero, and doesnt take into account webcam param in config.

StefanBruens commented 1 week ago

This is incorrect, prefix may be either "aligncam" or "webcam".

The current code works correctly, though the changed index in the config only applies after a restart.