Click here to go to the forum index Click here for the home page
 
Author Message

<  TAP and patch development  ~  Current/Previous Key States

Page 1 of 1
EMJB
Posted: Mon Jul 15, 2013 11:27 am Reply with quote
Frequent contributor Joined: 08 Jul 2005 Posts: 3630 Location: Maldon Essex
I am trying to find a way of finding if a TAP has been loaded as a result of being in Auto Start at boot, or as a result of being manually started from that directory subsequently. The time from boot is not really a satisfactory method, as V&V can make this quite long for an automatic start.

It occurs to me that if one could detect the value of the last keypress when the TAP started, it would be "OK" if the TAP was started manually, but either nothing or "Standby" if not. Alternatively, if one could detect whether a key was already held down when the TAP was started, a user could be instructed to hold the "OK" key down for an extended period when loading the TAP manually.

Does anyone know a way of implementing either of these?

TIA,

EMJB

_________________
Silver 5800, Board Rev 1.2, MS recomm F/W, Sudbury Tx, varying TAP config
View user's profile Send private message
BobD
Posted: Mon Jul 15, 2013 12:25 pm Reply with quote
MyStuff Team Joined: 03 Aug 2005 Posts: 4218
I think that the way MS detects it is to look for a timer due to start, or a recording that has just started. If either of those things is found, then MS reasons that the chances are that this is what woke the toppy up, and so MS has probably been loaded from AutoStart in response to a boot. If neither is found, then MS assume a manual loading from some folder or other.

_________________
FW: ChunkyWizard Recommended
TAPs:
MyStuff (always one version ahead of everyone else!), and recommended support TAPS
MyStuff skins, manual and latest version: http://www.BobDsMyStuff.co.uk
Known bugs & forthcoming fixes: http://www.BobDsMyStuff.co.uk/Bugs.shtml
Changes coming in the next version: http://www.BobDsMyStuff.co.uk/NextVersion.shtml
View user's profile Send private message Visit poster's website
juwlz
Posted: Mon Jul 15, 2013 12:43 pm Reply with quote
MyStuff Team Joined: 12 Aug 2005 Posts: 10801 Location: Wokingham, Berkshire (Hannington transmitter)
Lateral thinking - can you tell the start time of other running TAPs? Or the last accessed time of their ini files? If so, and they're all within <n> of each other - or now - then you can safely assume that the machine has just started up.

If you have to use last access time of ini files, it'll only work in situations (such as MyStuff installations) where you know the ini files used by the TAPs in Auto Start - for instance that MyStuff accesses MyStuff.dat, and EPG2MEI accesses EPG2MEI.ini, or you can find <TAPNAME>.ini in Settings for a <TAPNAME>.tap in Auto Start - but it might be better than nothing, if no other solutions are forthcoming.

Julie

_________________
5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+BmC0CfCtFsIMPePsR3UUuUxZ
5810, TS On, F/W: F/W: MS6 Recommended F/W 12/9/2009 +BmCfCtFsR3Z
MyStuff info; Help!; Reference
Harmony 885 remote. Sig date 8 April 2012
View user's profile Send private message Visit poster's website
ccs
Posted: Mon Jul 15, 2013 12:56 pm Reply with quote
Frequent contributor Joined: 30 Oct 2007 Posts: 2513
FWLOAD can be run from autostart. Does it give any clues?

_________________
TF5810, F/W: MS6 Recommended F/W 12/9/2009 -FmXl+CtEzIScVdZ
TAPs: EIT Sub v0.6; EPG2MEI v0.96; MPDisplayLITE V1.2; MyInfo B5.6; SecCache (UK) v0.4; Extend v1.7; MyStuff 6.6;
Sig generated by MyInfo on 20/10/14
ccsx
View user's profile Send private message
juwlz
Posted: Mon Jul 15, 2013 1:24 pm Reply with quote
MyStuff Team Joined: 12 Aug 2005 Posts: 10801 Location: Wokingham, Berkshire (Hannington transmitter)
ccs wrote:
FWLOAD can be run from autostart. Does it give any clues
EMJB wrote that himself Wink

_________________
5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+BmC0CfCtFsIMPePsR3UUuUxZ
5810, TS On, F/W: F/W: MS6 Recommended F/W 12/9/2009 +BmCfCtFsR3Z
MyStuff info; Help!; Reference
Harmony 885 remote. Sig date 8 April 2012
View user's profile Send private message Visit poster's website
ccs
Posted: Mon Jul 15, 2013 1:53 pm Reply with quote
Frequent contributor Joined: 30 Oct 2007 Posts: 2513
juwlz wrote:
ccs wrote:
FWLOAD can be run from autostart. Does it give any clues
EMJB wrote that himself Wink
I know, but I didn't like to say in case there really is a clue. Smile

_________________
TF5810, F/W: MS6 Recommended F/W 12/9/2009 -FmXl+CtEzIScVdZ
TAPs: EIT Sub v0.6; EPG2MEI v0.96; MPDisplayLITE V1.2; MyInfo B5.6; SecCache (UK) v0.4; Extend v1.7; MyStuff 6.6;
Sig generated by MyInfo on 20/10/14
ccsx
View user's profile Send private message
EMJB
Posted: Mon Jul 15, 2013 2:29 pm Reply with quote
Frequent contributor Joined: 08 Jul 2005 Posts: 3630 Location: Maldon Essex
ccs wrote:
FWLOAD can be run from autostart. Does it give any clues?
The FwLoad situation is rather different, in that it only runs once, and then deletes itself, and does not need to cater for the situation where it is run manually from Auto Start.

EMJB

_________________
Silver 5800, Board Rev 1.2, MS recomm F/W, Sudbury Tx, varying TAP config
View user's profile Send private message
EMJB
Posted: Mon Jul 15, 2013 2:36 pm Reply with quote
Frequent contributor Joined: 08 Jul 2005 Posts: 3630 Location: Maldon Essex
BobD wrote:
I think that the way MS detects it is to look for a timer due to start, or a recording that has just started. If either of those things is found, then MS reasons that the chances are that this is what woke the toppy up, and so MS has probably been loaded from AutoStart in response to a boot. If neither is found, then MS assume a manual loading from some folder or other.


Thanks - hadn't thought of that sort of approach, but I'm assume that in the event of a crash followed by a V&V (the situation where the simple time from boot criteria fails if too short) it would come to the conclusion that it was a manual load of the TAP. However will give it some more thought to see if I can combine it with other logic.

EMJB

_________________
Silver 5800, Board Rev 1.2, MS recomm F/W, Sudbury Tx, varying TAP config
View user's profile Send private message
Geoff Bacon
Posted: Mon Jul 15, 2013 2:41 pm Reply with quote
Frequent contributor Joined: 12 Jan 2007 Posts: 4222
When the tap starts, automatically close if it doesn't detect any remote key in the first 10 seconds (and channels exist).

When initiated manually, the user should already have their hand on the remote (ignore starting from TM/PcControl) so they just need to press a button to stop it closing.

Geoff

_________________
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; PruneEPG 1.0; fsSave 1.1; QuickJump 1.72; SecCache (UK) v0.4; EIT Sub (Game) v0.6; EPG2MEI v0.96; MyStuff 6.6; Bookmark 3.0; Extend v1.7; Font Manager 1.0d; MyInfo B5.6; MHEG On/Off A3;
Sig generated by EMJB's MyInfo.tap on 29/12/18
View user's profile Send private message Visit poster's website
ccs
Posted: Mon Jul 15, 2013 2:49 pm Reply with quote
Frequent contributor Joined: 30 Oct 2007 Posts: 2513
I think it's been suggested before, but 2 differently named taps, one in autostart and the other in utilities, would be an easy solution.

_________________
TF5810, F/W: MS6 Recommended F/W 12/9/2009 -FmXl+CtEzIScVdZ
TAPs: EIT Sub v0.6; EPG2MEI v0.96; MPDisplayLITE V1.2; MyInfo B5.6; SecCache (UK) v0.4; Extend v1.7; MyStuff 6.6;
Sig generated by MyInfo on 20/10/14
ccsx
View user's profile Send private message
BobD
Posted: Mon Jul 15, 2013 3:34 pm Reply with quote
MyStuff Team Joined: 03 Aug 2005 Posts: 4218
EMJB wrote:
Thanks - hadn't thought of that sort of approach, but I'm assume that in the event of a crash followed by a V&V (the situation where the simple time from boot criteria fails if too short) it would come to the conclusion that it was a manual load of the TAP. EMJB
Depends how long you allow it to consider a timer or recording as recent or imminent. However, my logic was indeed only intended for normal circumstances (basically deciding if MS should shut down again after the currently active timer/recording) so I didn't need to consider this case.

_________________
FW: ChunkyWizard Recommended
TAPs:
MyStuff (always one version ahead of everyone else!), and recommended support TAPS
MyStuff skins, manual and latest version: http://www.BobDsMyStuff.co.uk
Known bugs & forthcoming fixes: http://www.BobDsMyStuff.co.uk/Bugs.shtml
Changes coming in the next version: http://www.BobDsMyStuff.co.uk/NextVersion.shtml
View user's profile Send private message Visit poster's website
ccs
Posted: Mon Jul 15, 2013 3:58 pm Reply with quote
Frequent contributor Joined: 30 Oct 2007 Posts: 2513
ccs wrote:
I think it's been suggested before, but 2 differently named taps, one in autostart and the other in utilities, would be an easy solution.
Or maybe a tap in autostart could create a file/flag and then call utilities/CO, which could then check if the file/flag existed?

Would then only need to maintain utilities/CO.

_________________
TF5810, F/W: MS6 Recommended F/W 12/9/2009 -FmXl+CtEzIScVdZ
TAPs: EIT Sub v0.6; EPG2MEI v0.96; MPDisplayLITE V1.2; MyInfo B5.6; SecCache (UK) v0.4; Extend v1.7; MyStuff 6.6;
Sig generated by MyInfo on 20/10/14
ccsx
View user's profile Send private message
juwlz
Posted: Mon Jul 15, 2013 4:35 pm Reply with quote
MyStuff Team Joined: 12 Aug 2005 Posts: 10801 Location: Wokingham, Berkshire (Hannington transmitter)
ccs wrote:
ccs wrote:
I think it's been suggested before, but 2 differently named taps, one in autostart and the other in utilities, would be an easy solution.
Or maybe a tap in autostart could create a file/flag and then call utilities/CO, which could then check if the file/flag existed?
Unfortunately, both of those options rely on user compliance.

Julie

_________________
5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+BmC0CfCtFsIMPePsR3UUuUxZ
5810, TS On, F/W: F/W: MS6 Recommended F/W 12/9/2009 +BmCfCtFsR3Z
MyStuff info; Help!; Reference
Harmony 885 remote. Sig date 8 April 2012
View user's profile Send private message Visit poster's website
ccs
Posted: Mon Jul 15, 2013 4:43 pm Reply with quote
Frequent contributor Joined: 30 Oct 2007 Posts: 2513
juwlz wrote:
Unfortunately, both of those options rely on user compliance.
All taps need "user compliance" of some sort or another.

I wouldn't have thought it difficult to put autoCO in autostart and CO in utilities, assuming the theory works of course.

Just putting CO in utilities would be the norm, perhaps.

AutoCO in autostart if you want "extra" functionality.

_________________
TF5810, F/W: MS6 Recommended F/W 12/9/2009 -FmXl+CtEzIScVdZ
TAPs: EIT Sub v0.6; EPG2MEI v0.96; MPDisplayLITE V1.2; MyInfo B5.6; SecCache (UK) v0.4; Extend v1.7; MyStuff 6.6;
Sig generated by MyInfo on 20/10/14
ccsx
View user's profile Send private message

Display posts from previous:  

All times are GMT + 1 Hour
Page 1 of 1

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum