[Kwintv] Small kwintv3 patch

Rizsanyi Zsolt kwintv@mail.kde.org
Wed, 16 Oct 2002 02:36:35 +0200


On Tuesday 15 October 2002 23:57, George Staikos wrote:
> On October 15, 2002 16:22, Michael Kedl wrote:
> > It's been a while, but I used to write TV code....
> >
> > We have cable channels 1-125 here (what the US standard supports).
> > And now, digital channels are usually assigned numbers higher, this is
> > no longer actual frequency mapping like the first 125 obviously, just
> > simpler for people to understand.
> >
> > So I would suggest we allow channels higher than 99 in general. (maybe
> > someday we can incorporate the digital stuff into kwintv)
> >
> > I believe my tuning algorithms work(ed) something like:
> > a) get keypress 1
> > b) if 2s have passed, tune the channel and exit
> > c) if we get keypress 2,
> > 	1) shift over keypress 1
> > 	2) see if channel (say 10 or 20 as examples) times 10 is higher  than
> > highest channel (say 125)
> > 	3) if it is, (20), then tune it now and exit
> > 	4) if it isn't (10), then continue
> > 	5) if 2s have passed since key 2, tune the channel and exit
> > 	6) if we get keypress 3
> > 		aa) shift everything again, tune channel and exit
>
>    That sounds fine I think.

I would like (and that was my original proposal) to check for the highest 
channel not only at the step c) but also at the step a). That would make easy 
to enter channels with one digit.
I have configured all my frequently watched channels to be with numbers < 10.

So it would look like:

> > a) get keypress 1
> > 	a1) see if channel (say 3 or 5 as examples) times 10 is higher  than
> > highest channel (say 43)
> > 	a2) if it is, (5), then tune it now and exit
> > 	a3) if it isn't (3), then continue
> > 	a4) if 2s have passed since key 2, tune the channel and exit
> >   a5) if we get keypress 2,
> > 	  1) shift over keypress 1
> > 	  2) see if channel (say 10 or 20 as examples) times 10 is higher  than
> > highest channel (say 125)
> > 	  3) if it is, (20), then tune it now and exit
> > 	  4) if it isn't (10), then continue
> > 	  5) if 2s have passed since key 2, tune the channel and exit
> > 	  6) if we get keypress 3
> > 		aa) shift everything again, tune channel and exit

This is I think the most intuitive (because if you have only 50 channels and 
press 7 then you dont have to wait the delay, but you get your channel)

Regards
Zsolt