For discussions about development of TAPs, patches and other software for the Toppy

Moderator: Technical

Post Reply
EMJB
Frequent contributor
Posts: 3645
Joined: Fri Jul 08, 2005 9:43 am
Location: Maldon Essex

Current/Previous Key States

Post by EMJB »

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
BobD
MyStuff Team
Posts: 4220
Joined: Wed Aug 03, 2005 12:21 pm
Contact:

Post by BobD »

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
juwlz
MyStuff Team
Posts: 10804
Joined: Fri Aug 12, 2005 7:13 am
Location: Wokingham, Berkshire (Hannington transmitter)
Contact:

Post by juwlz »

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
ccs
Frequent contributor
Posts: 2689
Joined: Tue Oct 30, 2007 3:19 pm

Post by ccs »

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
juwlz
MyStuff Team
Posts: 10804
Joined: Fri Aug 12, 2005 7:13 am
Location: Wokingham, Berkshire (Hannington transmitter)
Contact:

Post by juwlz »

ccs wrote:FWLOAD can be run from autostart. Does it give any clues
EMJB wrote that himself ;-)
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
ccs
Frequent contributor
Posts: 2689
Joined: Tue Oct 30, 2007 3:19 pm

Post by ccs »

juwlz wrote:
ccs wrote:FWLOAD can be run from autostart. Does it give any clues
EMJB wrote that himself ;-)
I know, but I didn't like to say in case there really is a clue. :)
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
EMJB
Frequent contributor
Posts: 3645
Joined: Fri Jul 08, 2005 9:43 am
Location: Maldon Essex

Post by EMJB »

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
EMJB
Frequent contributor
Posts: 3645
Joined: Fri Jul 08, 2005 9:43 am
Location: Maldon Essex

Post by EMJB »

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
Geoff Bacon
Frequent contributor
Posts: 4662
Joined: Fri Jan 12, 2007 12:21 am
Location: Bristol
Contact:

Post by Geoff Bacon »

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+EvEzPePfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; MHEG On/Off A3; QuickJump 1.72; EIT Sub (Game) v0.6; SecCache (UK) v0.4; EPG2MEI v0.96; Font Manager 1.0d; Extend v1.7; WSSkiller V2.12d; MyInfo B5.6; fsSave 1.1; PruneEPG 1.0; MyStuff 6.6-1;
Sig generated by EMJB's MyInfo.tap on 3/5/21
ccs
Frequent contributor
Posts: 2689
Joined: Tue Oct 30, 2007 3:19 pm

Post by ccs »

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
BobD
MyStuff Team
Posts: 4220
Joined: Wed Aug 03, 2005 12:21 pm
Contact:

Post by BobD »

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
ccs
Frequent contributor
Posts: 2689
Joined: Tue Oct 30, 2007 3:19 pm

Post by ccs »

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
juwlz
MyStuff Team
Posts: 10804
Joined: Fri Aug 12, 2005 7:13 am
Location: Wokingham, Berkshire (Hannington transmitter)
Contact:

Post by juwlz »

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
ccs
Frequent contributor
Posts: 2689
Joined: Tue Oct 30, 2007 3:19 pm

Post by ccs »

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
Post Reply