mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Added basic support for positioners to control steerable satellite dishes
This commit is contained in:
44
PLUGINS.html
44
PLUGINS.html
@@ -99,6 +99,7 @@ structures and allows it to hook itself into specific areas to perform special a
|
||||
<li><a href="#Skins">Skins</a>
|
||||
<li><a href="#Themes">Themes</a>
|
||||
<li><a href="#Devices">Devices</a>
|
||||
<li><modified><a href="#Positioners">Positioners</a></modified>
|
||||
<li><a href="#Audio">Audio</a>
|
||||
<li><a href="#Remote Control">Remote Control</a>
|
||||
<li><a href="#Conditional Access">Conditional Access</a>
|
||||
@@ -2024,6 +2025,49 @@ new cMyDeviceHook;
|
||||
|
||||
and shall not delete this object. It will be automatically deleted when the program ends.
|
||||
|
||||
<div class="modified">
|
||||
<hr><h2><a name="Positioners">Positioners</a></h2>
|
||||
|
||||
<div class="blurb">Now you see me - now you don't!</div><p>
|
||||
|
||||
If you are using a positioner (also known as "motor" or "rotor") to move your
|
||||
satellite dish to receive various satellites, you will be using the 'P' command
|
||||
in the <tt>diseqc.conf</tt> file. This command sends the necessary data to the
|
||||
positioner to move the dish to the satellite's orbital position. By default VDR
|
||||
uses its builtin DiSEqC positioner control. If your positioner requires a different
|
||||
method of controlling (like maybe via a serial link), you can derive a class
|
||||
from <tt>cPositioner</tt>, as in
|
||||
|
||||
<p><table><tr><td class="code"><pre>
|
||||
#include <vdr/positioner.h>
|
||||
|
||||
class cMyPositioner : public cPositioner {
|
||||
private:
|
||||
void SendDiseqc(uint8_t *Codes, int NumCodes);
|
||||
public:
|
||||
cMyPositioner(void);
|
||||
virtual void Drive(ePositionerDirection Direction);
|
||||
virtual void Step(ePositionerDirection Direction, uint Steps = 1);
|
||||
virtual void Halt(void);
|
||||
virtual void SetLimit(ePositionerDirection Direction);
|
||||
virtual void DisableLimits(void);
|
||||
virtual void EnableLimits(void);
|
||||
virtual void StorePosition(uint Number);
|
||||
virtual void RecalcPositions(uint Number);
|
||||
virtual void GotoPosition(uint Number, int Longitude);
|
||||
virtual void GotoAngle(int Longitude);
|
||||
};
|
||||
</pre></td></tr></table><p>
|
||||
|
||||
See the implementation of <tt>cDiseqcPositioner</tt> in <tt>diseqc.c</tt> for details.
|
||||
<p>
|
||||
You should create your derived positioner object in the
|
||||
<a href="#Getting started"><tt>Start()</tt></a> function of your plugin.
|
||||
Note that the object has to be created on the heap (using <tt>new</tt>),
|
||||
and you shall not delete it at any point (it will be deleted automatically
|
||||
when the program ends).
|
||||
</div modified>
|
||||
|
||||
<hr><h2><a name="Audio">Audio</a></h2>
|
||||
|
||||
<div class="blurb">"The stereo effect may only be experienced if stereo equipment is used!"</div><p>
|
||||
|
Reference in New Issue
Block a user