Klaus Schmidinger wrote:
I have many doubts here: a) How can I display that the dish is moving and its position without disrupting the normal osd and without crashing xine?Try displaying a text message with Skins.Message(mtInfo, "some text"); This should be displayed in the channel display (if open) or as a separate message line.
Ideally the (new) channel display should stay open until the dish has reached the position (so looking at the screen you know why the dish is moving). Anyway, if I want to display only "Dish moving" for a short while that's probably enough. If I want to display only "Dish moving" during the whole movement, at the moment I have *not* to return from ChannelSwitch until the dish (fictitional at the moment) has reached the position. The only problem is that the channel displayed is the previous one and not the new one (obvious, since you update the channel display after ChannelSwitch has returned). This is not good enough. If i want to display the current position while the dish is moving, always without returning from ChannelSwitch for (;;) { if(p) { //p is an object that tells that source has a position CHECK(ioctl(fd_actuator, AC_RSTATUS, &status)); char *buf=NULL; asprintf(&buf,"Dish moving->%i %i",status.target, status.position); Skins.Message(mtInfo,buf); free(buf); } Key = cRemote::Get(10); cRemote::Put(Key); if (((status.state == ACM_IDLE) && p) || (Key != kNone)) break; } It won't work: it will only update the message every 2 seconds.
b) is there a better way to determine when it's time to move the dish or the status monitor is the correct hook?That would be the right place.c) is it correct not to return from ChannelSwitch until the dish has reached the position (or a key has been pressed)? If it isn't, how can I accomplish a)?You must return from the cStatus calls as soon as possible (which means: immediately)! You may need to start a spearate thread that handles your actuator control.
No need, the kernel module will take care of the control. A thread may be needed just to display the current position. Btw, someone complained that while the dish is moving vdr would pick up new channels/transponders from satellites it sees before reaching the target (I don't see how this can happen with a diseqc motor, but in my case it's definitely possible). Maybe there should be a way to turn off automatic channel update while the dish is moving/is in error (or, more simply, is not positioned)?
Calling Skins.Message() is not thread safe, though. Maybe I need to do something in that area...
Anyway the problem mentioned above (the display refreshed only every 2 seconds) won't go away, even if it is thread safe :-/
d) do you know of any free byte in the cmos ram whare I could store the current position? (ok, this one isn't strictly related to vdr and the osd, but the wizards that developed the cmos wake up program for vdr maybe know and are reading this list)Why don't you just store that information as a setup parameter using the plugin's setup mechanism? What's the point in storin this in the CMOS RAM?
Because the dish could be moving while the pc is turned off and so it's impossible to safely save the position in a file. When power is restored I want the last position written to the cmos ram (there will be some error due to inertia but it would be negligible). Bye -- - Yo tambiƩn quiero una Europa libre de Patentes de Software - - I want a Software Patents Free Europe too! And you? - --------------------------------------------------------------- EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es
Attachment:
signature.asc
Description: PGP signature
Attachment:
signature.asc
Description: OpenPGP digital signature