Search Archive

Need coding help to display the date correctly - now solved

By N-S-E-W · Dec 02, 2008in Hacks/Mods💬 34 posts👁️ 4,081 views
Page 1 of 2
Posted Dec 02, 2008 · 02:06 UTC#1

1st off let me say what a great forum this is. I purchased a 5000 BT two weeks ago and decided to see what kind of forums there were so I could get better acquainted with the unit. Little did I know I would find myself applying some the modifications listed on this site.

 

I've learned so much from some of the threads that Stephanie participated in as well as Boris, Leet and others.

 

I started trying to figure out how to get the date to show on the unit. The following is the code I entered but as you can see from the picture the format is showing the year-month-day. The format I was looking for is month/day/year. If any one has any ideas on what I need to change it would be much appreciated. I've also at my daughters request added a bitmap at the top left hand corner. I have absolutely no skills as to how create the image with a transparent background. I would also appreciate if someone can help with that.

 

FYI - This is the first time I've ever posted a photo on a site. Please accept my apologies if it appears too large.

 

Thanks.

post-24694-1287275637603_thumb.jpg

Posted Dec 02, 2008 · 02:11 UTC#2

Here's the code I used for the date in case anyone is interested:

 

Posted Dec 02, 2008 · 05:54 UTC#3

I'm pretty sure there is something in Regional Settings that lets you specify what kind of date format you want to use....

Posted Dec 03, 2008 · 01:11 UTC#4

Thanks for the reply Boris.

 

I tried that as well before the post. Do the in-dash units show the date anywhere in stock form? The reason I ask is because the 500 does not but did have the options to change the way the dates are displayed. I'll try to play with the code a little bit to see if I have any luck.

Posted Dec 03, 2008 · 16:45 UTC#5

Hmmmm, I don't think stock skin has date anywhere that I've seen. I've seen some other skins showing it, so it is possible...

Posted Dec 04, 2008 · 02:03 UTC#6

Boris,

 

Since I didn't see anyone else with a date showing in any of the other posts, I thought I'd take a stab st it. I tried changing formatmodel="b]local_dateformat"visiblemodel="gps.current_date.valid" fonttype=bw> to

formatmodel="b]regional_dateformat"visiblemodel="gps.current_date.valid" fonttype=bw>

and that didn't work. I'll play with it more in the next couple of days.

Posted Dec 04, 2008 · 02:10 UTC#7

What did you use for textmodel?

 

In the IPAQ version, they show date like this:

Posted Dec 04, 2008 · 02:18 UTC#8

I started with:

 

 

at and changed references from time to date. The first try all that showed was a "0". Then to my surpise when I deleted > dayperiod=0 <

it showed up, but in the current format.

Posted Dec 04, 2008 · 02:24 UTC#9

I get back in about 15 minutes. I'm going to try what you posted and see what happens. Of course I'll change the fonts and location first.

Posted Dec 04, 2008 · 02:43 UTC#10

No luck with one. It dispays the way as before. I took the unit in the garage until I got a signal just to be sure. I also tried differant combinations in the regional settings.

Posted Dec 04, 2008 · 16:37 UTC#11
No luck with one. It dispays the way as before. I took the unit in the garage until I got a signal just to be sure. I also tried differant combinations in the regional settings.

 

May be it's just not there... I searched through the executable but did not see any other format models for dates.

 

Although may be I need to look at the settings file to see if it is actually doing SETDATEFORMAT after you specify it in settings...

Posted Dec 04, 2008 · 19:10 UTC#12

Boris,

 

Last night when I transferred the updated navigate file to my unit I somehow messed up. I re-did it and now the date displays correctly based on the regional settings.

 

The code you listed is correct. Sorry I reported something false the first time.

 

Your help is greatly appreciated.

 

To everyone else, In case you want to have the date shown on your unit. Copy and paste the code Boris listed:

 

onto the navigatemap_800_480.ui file into the first layer.

 

Don't forget to change the font and location to your liking. As far as I can tell, the font that's currently listed is not on our units.

Posted Dec 04, 2008 · 20:01 UTC#13
Boris,

 

Last night when I transferred the updated navigate file to my unit I somehow messed up. I re-did it and now the date displays correctly based on the regional settings.

 

The code you listed is correct. Sorry I reported something false the first time.

 

Good. It would've been rather satrange if they have removed this particular functionality...

 

Don't forget to change the font and location to your liking. As far as I can tell, the font that's currently listed is not on our units.

 

No, this is the default font Twingos skin for IPAQ 31x series uses. Once could load the font onto AVIC as well, but I, personally, do not find it any better looking than Tahoma we have.

Posted Jan 21, 2009 · 01:59 UTC#14

Been trying to add this to my 500, I want it below the clock @ top right. But I'm not sure what the relationship of the 'z....' and 'w....' are to the positioning. Can anyone help me out?

 

Cheers :)

Posted Jan 21, 2009 · 02:00 UTC#15

Been trying to add this to my 500, I want it below the clock @ top right. But I'm not sure what the relationship of the 'z....' and 'w....' are to the positioning. Can anyone help me out?

 

Cheers :)

Posted Jan 21, 2009 · 02:18 UTC#16

Here's a little helpful info I copied from Stephanie and have placed in file for future reference. The thread this is from probably originated back in August.

 

x=### is the value in pixels from the left side of the screen to the left edge of the text.

 

y=### is the value in pixels from the top of the screen to the top edge of the text.

 

w=### is the width of the text in pixels (handy for centring or right-justifying)

 

z=### is the 'layer' to get stuff above other stuff. Higher z = more visible. Useful for putting text ontop of background graphics.

 

h=### is the height of the text in pixels (handy for vertical alignment)

Posted Jan 21, 2009 · 02:34 UTC#17

I altered 'x' and 'y' in Boris' example on previous page, hoping to get the date somewhere close to being in between the clock and the compass - but after replacing the DATA.zip and re-starting, it just hung at the "System startup...." screen. So for now I've commented-out the date text until I can come up with a solution. Looks like this will keep me busy again over the next few days LOL!

 

Thanks again for your help, it's much appreciated :)

 

Mark.

Posted Jan 21, 2009 · 03:54 UTC#18

Mark,

 

I have a feeling you may not have changed font to one that's in your zip file. If a font is called for that is not on the unit, it will hang at startup.

 

Here's my code as it appears in my latest pictures from the trip computer thread:

 

 

I'm guessing when say between the compass and time, you're refeering to the top left portion of the screen?

 

Time for bed.

Posted Jan 21, 2009 · 05:57 UTC#19

No, I was ok with the font, after much head scratching I realised I hadn't put the '#' in 'color2=#0000CD'! But I did sort it - eventually. :D

 

My clock is at top right of screen, compass below it - my aim was to insert the date in the space between them. It's now sorted, so my next job is to find how to move the Speedcam warning box to another part of the screen.

 

Heres my code for the clock and date:

 

;Date

 

;Clock

Posted Jan 23, 2009 · 01:03 UTC#20

Duh, what was I thinking when I said left.

 

Now that makes two of us displaying the date. :P

 

Here's a tip in case anyone is using the 12 hour clock and wants it show whether it's AM or PM. In the code for the time change dayperiod=0 to dayperiod=1

Could be useful if you're a party animal in Alaska and lost your sense of time.

Posted Jan 23, 2009 · 01:41 UTC#21
Duh, what was I thinking when I said left.

 

LOL thats what I thought :lol:

 

Anyway, I think I've sorted the Speedcam warning box relocation, took a lot of time experimenting with the position, and the box/background is separate to the items displayed inside it so I had to alter all the individual 'x=' and 'y=' values. Was easy once I got into it, the biggest ball-ache is swapping/deleting/copying etc. with the SD card.

 

I'm waiting for the unit to get sat reception but its been struggling for 20 minutes now - I've copied the new DATA.zip but no reception yet.........

Methinks theres sumat wrong, although I dont understand how changing the Speedcam data could affect sat signal????????

Posted Jan 23, 2009 · 02:00 UTC#22

20 minutes does seems a bit long. Could just be a fluke.

Posted Jan 23, 2009 · 20:21 UTC#23

All is well, I moved all the speedcam warning stuff and it's just where I wanted it. seems it was a fluke, I've used it several times today and it works fine.

 

Now my next adaptation of Mavs' mods - I want to make the GPS altitude and speed/limit display with route, at the moment they are only shown without route. Should keep me busy for a few more hours...........

 

:)

Posted Feb 16, 2009 · 20:33 UTC#24

Right, after a couple of weeks with your date mod I have one thing I would like to alter: there is no space between the digits and the delimiters.

 

Present date > 16/02/2009 (looks squashed up with the font/size I have)

 

Required date > 16 / 02 / 2009

 

Where is the template (I looked in templates/800_480/ui.) and how do I alter it? Hope you can help once again :)

Posted Feb 16, 2009 · 22:39 UTC#25
Right, after a couple of weeks with your date mod I have one thing I would like to alter: there is no space between the digits and the delimiters.

 

Present date > 16/02/2009 (looks squashed up with the font/size I have)

 

Required date > 16 / 02 / 2009

 

Where is the template (I looked in templates/800_480/ui.) and how do I alter it? Hope you can help once again :)

 

It's not anywhere on our units that I know of. That's part of the reason I tackled it to begin with. One thing you can try, but it won't put spaces in is to expand your "w" size a little more. Since you increased your font size you may have reached your predetermined "w" parameter. I had mine at 110 to fit in a bmp that's 120 wide.

Page 1 of 2