This is a "plugin" for the Video Disk Recorder (VDR).

Written by:                  Morfsta <morfsta@gmail.com>

Project's homepage:          http://projects.vdr-developer.org/projects/plg-rotor-ng


Pieces of code and inspiration taken from the rotor plugin by  
Thomas Bergwinkl and actuator plugin by Luca Olavetti.


This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
See the file COPYING for more information.

THIS VERSION OF THE PLUGIN IS FOR vdr >= 1.7.15

DESCRIPTION

With this plugin you can control a disecq 1.1 rotor. 

You can also use it without a rotor giving it the command line option,
-s or --scanonly, in this case it will work as a channel scanner.

THEMES

The plugins supports color themes to better blend with vdr. The default
theme uses the same color as the ST:TNG skin, to use the other provided
themes, copy the *.themes file to your themes directory. I provide themes
for the following skins

-Enigma
-Enigma with the Dark Blue theme
-Elchi

but you can write your own since these are standard vdr themes for a fake
"rotorng" skin.

SETUP MENU

In the setup-menu of the plugin you have to select the dvb card which is
connected to the dish driven by the rotor (see below in "KNOWN PROBLEMS"
about multi cards setups).

Number 1 here is the first dvb adapter (/dev/dvb/adapter0), 2 the second
(/dev/dvb/adapter1) and so on.

If you don't have an rotor, this will be the card used for channel
scanning.

You can also set a minimum screen refresh time (in ms) that will be used in
the plugin main menu: I found that, with a dxr3, if you refresh the screen
too often the osd gets garbled. I set it to 250 for my dxr3. Note that too
low a value will cause high cpu usage.

Finally you can select wether there should be an indication of the dish
position when the satellite is changed.  [this does not work with rotor and will be removed]

MAIN MENU

In the plugin-menu you see on the top the dish target and position
Next there's an indication of the signal strength of the currently
tuned channel. You also see the dish target and the dish position.

Then the onscreen buttons (select with up,down,left,right, operate
with Ok):

Drive East      : moves the dish east.
Halt	    	: stops any movement of the motor.
Drive West 	: moves the dish west.
Recalc 		: sets the position of the dish to the position of the
                  currently selected satellite (source). [DOES NOT WORK CURRENTLY]
Goto xx    	: actuator goes to position xx.
Store    	: the current position will be stored to the current
		  satellite (source).
XX Steps East	: dish moves XX steps eastwards.
Enable/Disable
Limits          : enables/disables the soft limits. Note that the limits
                  will be automatically enabled when you leave the menu. [BUGGY CURRENTLY]
XX Steps West	: dish moves XX steps westwards.
Set East Limit  : sets the position of the dish at 0 and recalculates all
                  stored positions.
Set Zero        : sets the position of the dish but won't recalculate stored
                  positions. [DOES NOT WORK]
Set West Limit  : stores the current position as the west soft limit.


The above buttons will only will available in rotor mode (without the -s
or --scanonly command line option).

If you're positioned on the line showing the current satellite, you can
select another one with the left and right buttons and go to its position
with the Ok button.

WARNING if you are using the plugin as a channel scanner only, make sure
you select the correct satellite, since all found channels will be stored
under the selected satellite. The same applies if you're using it as an
actuator, but in that case the plugin will only allow transponder/satellite
scanning if the position is set and the current position is equal to the
selected position.

Then there are fields to select the parameters of a transponder:

Frequency: the frecuency (direct entry) and polarization (left and right
button).
Symbolrate: direct entry
Sys: press OK to switch between DVB-S and DVB-S2
Mod: press OK to switch between the possible modulations (QPSK, 8PSK,
16APSK, 32APSK and DIRECTV, unfortunately vdr isn't able to display all of
them so you'll see ??? instead).
FEC: Select the FEC
Rolloff: Select the Rolloff
Vpid: direct entry of the video pid
Apid: direct entry of the autio pid

Pressing OK on any of the fields Frequency, Symbolrate, FEC, Rolloff, Vpid or Apid will tune to the selected transponder so you can see what signal-strength you get there. If you correctly entered the pids, you should also see the new
channel on screen. Pressing the red key will hide the osd until you press
any other key, so you can check if you tuned to the correct channel.

Scan Transponder: If you press OK on Scan Transponder, vdr
will switch to the selected transponder and scan for new/updated channels.
During this operation a message and a progress bar is shown, and
pressing any key will interrupt the scanning. The header of the screen will
show the total number of channels found and the number of new ones.
 

SATELLITE SCANNING

if the plugin can find a file for the current source in the
"plugins/transponders" subdirectory of the configuration directory, there
will be an additional option "Scan Satellite". The two numbers at right are
the index of the transponder from where the scanning will start (so that you
can make a partial scan) and the total number of the transponders found in
the file. If you press left or right you can select a different transponder
and its data will be shown in the Frequency and Symbolrate fields. If you
press OK all transponders, starting from the selected index, will be
scanned. A message and a progress bar will be shown, and pressing any key
will stop the operation, leaving the index at the current position so you
can resume scanning later on. The header of the screen will show the total
number of channels found and the number of new ones.

The name of the transponder file for a satellite is XXXX.ini, where XXXX
represents the satellite position in tenths of degree, eg. for 
28.2E the filename will be 0282.ini, for 30.0W the filename will be 3300.ini
(i.e. (360.0-30.0)*10).
The file format is the same as the channelscan plugin, which in turn claims
to use the same format as the windows program prog-dvb.
You can search for pre-made ini files on google.

MARKING CHANNELS

Channel marking is an aid in finding stale channel entries.
Marking a channel means prepending a "+" to its name, if, during a
transponder or satellite scan, a channel is found the "+" will be removed,
so the channels that still have a "+" in the name haven't been found during
a scan (note that this doesn't mean the channel is invalid, so check them
before deleting them).

The button "Mark channels" will mark all channels belonging to the currently
selected satellite, "Unmark channels" and "Delete marked channels" will
allow you to either remove the mark from all the channels or delete all
marked channels (regardless of the satellite they belong to).

Note that this isn't a foolproof method to remove stale channels (e.g. I
cannot seem to find many spanish channels with a channels scan even if
they're regularly broadcasting, spaniards in power are allergic to
standards) so double and triple check before hitting the "Delete marked
channels" button.

ROTORNG.CONF

This file maps diseqc satellite location numbers to satellite descriptions, for example: -

28.2E 1
19.2E 2

The file rotorng.conf must be in your VDR plugins configuration directory. See the examples directory for my rotorng.conf file.

KNOWN PROBLEMS

- in a multi card setup, vdr considers all cards equally capable of providing
any source (satellite), regardless to the dish/lnb the card is connected to.
This is obviously wrong. Attached to the following post you'll find a patch
to configure which sources (satellites) a card can relly tune to:
http://article.gmane.org/gmane.linux.vdr/14038

- If a recording starts on a different satellite than the current one, it's
possible than vdr will restart if it takes too much time to reach the
position. In the patches subdirectory there's a steerable-vdr-x.x.x.patch to
give more time to the dish to reach the target after starting a recording.

- currently there is no way to assign a satellite to a disecq rotor number. This must be done manually at the moment in the rotorng.conf file.
