ziutek / dvb

DVB/MPEG-TS library (pure Go)
BSD 3-Clause "New" or "Revised" License
99 stars 17 forks source link

Diseqc Funtion to tune.go #11

Open xforze opened 4 years ago

xforze commented 4 years ago

Hi all! I have linuxdvb working fine on my armhf Board with an USB DVB-S Card. Could you please give me a hint how to add Disceq control to "examples/internal/tune.go" ?

As far as I found out is that the Diseqc Command is defined: dtvDiseqcMaster cmd = 7 but I dont know how to use it.

I tried to add and call a function to api5.go:

func (d Device) SetDiseqcMaster() error {
        e := d.set(dtvDiseqcMaster, 1)
        if e != 0 {
                return Error{"set", "Diseqc", e}
        }
        return nil
}

But this results in the error: set Diseqc: invalid argument

I have 4 LNB attached to a diseqc switch and need to switch between those.

Cheers, Thomas

ziutek commented 4 years ago

Hmm. I've never used DISEQC. You need to study the linux DVB API to see does the arguments are correct. Also check the function number is correct.