Bílý vrch
icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • internal / bluetooth / simulator GPS
  • offline raster maps
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • custom views
  • MIDP and Symbian phones
  • Blackberry
  • Android
Visit wiki to see all features, guides and howtos. Project tracker.

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
0.9.84-devel
Goto page 1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    TrekBuddy Forum Index -> Recycle Bin
View previous topic :: View next topic  
Author Message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5662

PostPosted: Thu Mar 12, 2009 6:51 pm    Post subject: 0.9.84-devel Reply with quote

This is development snapshot of 0.9.84 with new CMS feature - integration of HECL scripting language (www.hecl.org). The build should be quite stable, but it is intended mainly for people interested in CMS, to get early feedback.

HECL may become extensibility vehicle for TB for features like live-tracking plugins, I plan to test it, we'll see. In this version, only its core is integrated, which should be enough for custom calculations, etc.

What is new in CMS?

Handlers for the following events can be defined:
    * onTrackingStart - invoked when trackign is started; possible use: reset custom variables
    * onTrackingStop
    * onLocationUpdated - invoked when new location is received; example use: calculate custom variables
    * onKeyPress - invoked when key 2 / joy up is pressed (the only key left Crying or Very sad ); example use: change custom variable scale

The handler(s) must be defined in a text file with .hcl extension. Example (rather stupid):

Code:
var kruch::xxx 0

proc kruch::onTrackingStart {} {
    set kruch::xxx 0
}

proc kruch::onLocationUpdated {} {
    set kruch::xxx [* $cms::spd 3.14]
}


In the script file, custom variables may be defined and later used in the screen definition:

Code:
<area x="0" y="0" w="80" h="20">
    <value>{$kruch::xxx}</value>
</area>


For very simple stateless formulas, you can embed scriptlet directly:

Code:
<area x="0" y="20" w="80" h="20">
    <script>print [* $cms::spd 3.14]</script>
</area>


I suggest to use developer-specific prefixes for global variables, handlers (procedures) to avoid collisions since users may use profiles from more designers. I favour C++like "namespacing" which I used in the above examples (kruch::), and I would also use kruch.hcl and cms.kruch.xml filenames.

More complex example: http://www.trekbuddy.net/forum/viewtopic.php?t=2923

The following TB-specific HECL commands were added:

    var - declares global variable that may be used in screen
    print - "prints" argument(s) to area valuearea

The following TB variables (subject to change) are available during script execution:

    cms::profile
    cms::course
    cms::course-d
    cms::asc-t
    cms::desc-t
    cms::dist-t
    cms::alt
    cms::alt-d
    cms::hdop
    cms::fix
    cms::sat
    cms::satv
    cms::spd
    cms::spd-avg-auto
    cms::spd-avg
    cms::spd-max

They are the same variables already available but prefxied with cms::, except for cms::profile, which is filename of currently
displayed screen.

You can get status of last invocation of your handler as a variable with the same name, eg. if you have a handler

Code:
proc xxx::onLocationUpdated {} { ...


then variable $xxx::onLocationUpdated will either be "{SUCCESS}" or (hecl)exception that occured during handler processing.

To play with HECL, you can eg. download HECL distribution, and run your script with commandline like java -jar jars\j2se\hecl.jar test.hcl.

http://www.trekbuddy.net/beta/0984-20090312.zip (generic version)

This build also contains:

    - UIQ back key fix
    - larger max map scrolling step
    - "north-locking" on compass screen (press key 5 / FIRE)
    - sliding compass feature in CMS (willbe demonstrated in the announced example too)
    - various changes here and there (input handling etc)


2009-07-02 22:00 newer build:

    - Blackberry "white screen" fix
    - CMS/HECL bugfixes
    - new CMS/HECL vars: cms::lat, cms::lon, cms::time (time of the fix, not system), cms::utm_x, cms::utm_y, cms::wpt-azi

generic version
blackberry 4.2+ version


Last edited by kruch on Thu Jul 02, 2009 8:08 pm; edited 15 times in total
Back to top
View user's profile Send private message
vincent



Joined: 11 Feb 2008
Posts: 196

PostPosted: Thu Mar 12, 2009 7:12 pm    Post subject: Reply with quote

directly to test this huge upgrade ! Very Happy
_________________
SE K750i + 512MB MS2 OR HTC Diamond + Qstarz BT-818 + Wintec 301 + latest TB
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5662

PostPosted: Thu Mar 12, 2009 7:16 pm    Post subject: Reply with quote

You are fast! I suggest to wait for the announced example Twisted Evil
Back to top
View user's profile Send private message
vincent



Joined: 11 Feb 2008
Posts: 196

PostPosted: Thu Mar 12, 2009 7:21 pm    Post subject: Reply with quote

ok ok ...but it's so enormous that Smile ....
_________________
SE K750i + 512MB MS2 OR HTC Diamond + Qstarz BT-818 + Wintec 301 + latest TB
Back to top
View user's profile Send private message
MaleSMurf



Joined: 10 Sep 2007
Posts: 120

PostPosted: Thu Mar 12, 2009 7:27 pm    Post subject: Reply with quote

Well, here we go... the announced example... Wink

http://www.trekbuddy.net/forum/viewtopic.php?t=2923
Back to top
View user's profile Send private message
vincent



Joined: 11 Feb 2008
Posts: 196

PostPosted: Thu Mar 12, 2009 7:39 pm    Post subject: Reply with quote

the download link of beta do not work for me ?
_________________
SE K750i + 512MB MS2 OR HTC Diamond + Qstarz BT-818 + Wintec 301 + latest TB
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5662

PostPosted: Thu Mar 12, 2009 8:19 pm    Post subject: Reply with quote

What ?? Shocked
Back to top
View user's profile Send private message
vincent



Joined: 11 Feb 2008
Posts: 196

PostPosted: Thu Mar 12, 2009 8:56 pm    Post subject: Reply with quote

my reliable provider .. grgrgr !

ok now ...

_________________
SE K750i + 512MB MS2 OR HTC Diamond + Qstarz BT-818 + Wintec 301 + latest TB
Back to top
View user's profile Send private message
Wunibald



Joined: 29 Jul 2008
Posts: 35

PostPosted: Fri Mar 13, 2009 6:20 pm    Post subject: Reply with quote

... great, works very good !!! Very Happy Very Happy Very Happy Very Happy Very Happy

W.
Back to top
View user's profile Send private message
milan.zeleznik



Joined: 04 Mar 2008
Posts: 25

PostPosted: Fri Mar 13, 2009 10:01 pm    Post subject: Reply with quote

Works great! Very Happy ...
...but I'm still missing total-ascend & total descent data Confused

_________________
Samsung Galaxy Core 2
http://mygpx.blogspot.com
Back to top
View user's profile Send private message
MaleSMurf



Joined: 10 Sep 2007
Posts: 120

PostPosted: Fri Mar 13, 2009 10:14 pm    Post subject: Reply with quote

With HECL you can code these features... Cool
Thats the reason why HECL is implemented in TB... Wink

Well, I'll think about it how this could be done...
Back to top
View user's profile Send private message
milan.zeleznik



Joined: 04 Mar 2008
Posts: 25

PostPosted: Fri Mar 13, 2009 10:28 pm    Post subject: Reply with quote

@MaleSMurf:
Yes, that's right. But you are IN this code, I'm not... Sad
I'm glad to hear: I will think about... Very Happy

_________________
Samsung Galaxy Core 2
http://mygpx.blogspot.com
Back to top
View user's profile Send private message
MaleSMurf



Joined: 10 Sep 2007
Posts: 120

PostPosted: Fri Mar 13, 2009 10:31 pm    Post subject: Reply with quote

@milan.zeleznik

Laughing IN this code...
I had some sleepless nights to get my new CMS with HECL working. Wink
Back to top
View user's profile Send private message
milan.zeleznik



Joined: 04 Mar 2008
Posts: 25

PostPosted: Fri Mar 13, 2009 11:21 pm    Post subject: Reply with quote

Quote:
I had some sleepless nights

I can imagine...

_________________
Samsung Galaxy Core 2
http://mygpx.blogspot.com
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5662

PostPosted: Sat Mar 14, 2009 1:03 am    Post subject: Reply with quote

I wasn't updating the list of variables in http://www.trekbuddy.net/forum/viewtopic.php?t=296 for a long time, but asc-t & desc-t are available.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    TrekBuddy Forum Index -> Recycle Bin All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7  Next
Page 1 of 7

 
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
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group