For those who want to play with the moonphases I made some
transparent moon-icons. They are 25x25 px.
The command to get the moonphase is:
calcvar,varx,moonphase,1
You get values from 0 to 7 where 0 is newmoon and 4 is fullmoon
(the pictures are named like the values - moon0.bmp ... moon7.bmp)
Here is a pic of the phases :
Greetings Broesel
Edit: Reattached the moonphases
How do you call the images.
Quote from: joelw135How do you call the images.
Well, it should be made with the new imagemeter-command, but because
I dont know the syntax, i made it with the if-command as follows:
calcvar,var10,moonphase
if,var,var10,,=,0
image,6,2,Moon0.bmp,t
endif
else
if,var,var10,,=,1
image,6,2,Moon1.bmp,t
endif
else
if,var,var10,,=,2
image,6,2,Moon2.bmp,t
endif
else
if,var,var10,,=,3
image,6,2,Moon3.bmp,t
endif
else
if,var,var10,,=,4
image,6,2,Moon4.bmp,t
endif
else
if,var,var10,,=,5
image,6,2,Moon5.bmp,t
endif
else
if,var,var10,,=,6
image,6,2,Moon6.bmp,t
endif
else
if,var,var10,,=,7
image,6,2,Moon7.bmp,t
endif
else
endif
Greetings Broesel
Real strange, I pasted the code into my skin and changed the X & Y to position it where I wanted. The moon showed up for one second and blanked out the complete region. I tried to reload TodayPlus, and it wouldn't load until I copied the old skin on top of this revised code. Never had that happen before. My X & Y were a little off because the moon showed up on top of the Sunrise icon.
Dear Broesel,
I was wondering is you could tell us how you where able to display the moonrise(MA), moonset(MU), and moonillumination(sichtbar) values as they are displayed in this post?
http://www.dark-mojo.com/todayplus/viewtopic.php?t=1061&start=0&postdays=0&postorder=asc&highlight=moonphase
I have tried guessing the commands but I've had no luck. Could you give us an example of how to display these?
Also for joelw135,
I am not sure if this helps, but there's one thing you can try. My region with the moonphases has its refresh rate set to 60, not -1. Maybe try changing that and see if it helps.
Thanks.
Are you talking about the regions command? If that is the case, I tried it , no luck.
region,0,0,-1
@joel: don't know, if the commands i made are wrong or right.
They work for me in region 0 and I can't give any support for this, because I was only trying around with the commands. Even if some commands work, I don't know if they are official and without bugs, so please dont ask for support with them (srs please don't beat me, if it is too early for trying with them) :oops:
moonrise:
moontime,1,rise,official,24,42,HH:mm,,,l
moonset:
moontime,1,set,official,80,42,HH:mm,,,l
illumination:
moontime,1,visible,,35,55,,, % sichtbar,l
You can play with them but please on your own risk !
Greetings Broesel
No problem, I was putting it in region 0 also, but I will wait till srs gets back and lets us know.
Quote from: joelw135No problem, I was putting it in region 0 also, but I will wait till srs gets back and lets us know.
Hey joelw135, I have an idea... but I do not know enough about the code to do what I want... maybe you can help me :)
What do you think to place the moon illumination in region 0 in the same place of the sunrise and sunset, switching from moon to sun and viceversa with the same approach of the system/storage card memory ...?(images and text automatically change from one to the other with a certain interval)
I tried it, but I had no success.
Maybe you can do something better ? :lol:
Thanks
Sounds like a nice idea, I wanted to put it alongside the Sunrise and Sunset and above the elevation of the sun. I left a space on my skin. If I was able to get the basic working on would give it a try. But as of now there is something in the code that won't let me use it.
Quote from: joelw135Real strange, I pasted the code into my skin and changed the X & Y to position it where I wanted. The moon showed up for one second and blanked out the complete region. I tried to reload TodayPlus, and it wouldn't load until I copied the old skin on top of this revised code. Never had that happen before.
I also pasted the code in my skin, and had the same result as joelw. Even in different regions...
I think, it could have to do with the if then else ...
Maybe this works:
calcvar,var10,moonphase
if,var,var10,,=,0
image,6,2,Moon0.bmp,t
else
endif
if,var,var10,,=,1
image,6,2,Moon1.bmp,t
else
endif
if,var,var10,,=,2
image,6,2,Moon2.bmp,t
else
endif
if,var,var10,,=,3
image,6,2,Moon3.bmp,t
else
endif
if,var,var10,,=,4
image,6,2,Moon4.bmp,t
else
endif
if,var,var10,,=,5
image,6,2,Moon5.bmp,t
else
endif
if,var,var10,,=,6
image,6,2,Moon6.bmp,t
else
endif
if,var,var10,,=,7
image,6,2,Moon7.bmp,t
else
endif
Greetings Broesel
No, that didn't do it either. I can't figure out why it works in yours and not others. Maybe if one of the brains comes on tonight, they could figure it out.
Thanks for the help, Broesel.
Joelw135, Im starting to believe your problems isnt in the if/else statements. If you want to try another method of writing it, this is how I write mine:
if,var,var9,,=,0
image,160,14,moonphase\0.png,t
else
if,var,var9,,=,1
image,158,14,moonphase\1.png,t
else
if,var,var9,,=,2
image,158,14,moonphase\2.png,t
else
if,var,var9,,=,3
image,158,14,moonphase\3.png,t
else
if,var,var9,,=,4
image,158,14,moonphase\4.png,t
else
if,var,var9,,=,5
image,158,14,moonphase\5.png,t
else
if,var,var9,,=,6
image,158,14,moonphase\6.png,t
else
if,var,var9,,=,7
image,158,14,moonphase\7.png,t
endif
endif
endif
endif
endif
endif
endif
endif
It may look sloppy but it hets the job done!
No luck there either, Here is my skin region 0 please look and see if I am missing anything. The one above was incorrect.
//=================================================
// REGION 0 - PAGE 0
// Date section
// Dimensions: 240 x 70
//=================================================
region,0,0,-1
defregion,0,0,0,240,70,1
updateregions,14
offset,offset_-1,offset_-1
offsetadd,0,2
changefont,tahoma,8,
color,font,255_255_0
suntime,%var0%,elevation,,72,59,%05.2f,Ele: ,°,l
color,font,_-1_4_-1
image,113,44,sunrise.png,
suntime,1,sunrise,official,111,59,hh:mm,,,l
image,135,44,sunset.png,
suntime,1,sunset,official,134,59,hh:mm,,,l
calcvar,var9,moonphase
if,var,var9,,=,0
image,85,44,moonphase\Moon0.bmp,t
else
if,var,var9,,=,1
image,85,44,moonphase\Moon1.bmp,t
else
if,var,var9,,=,2
image,85,44,moonphase\Moon2.bmp,t
else
if,var,var9,,=,3
image,85,44,moonphase\Moon3.bmp,t
else
if,var,var9,,=,4
image,85,44,moonphase\Moon4.bmp,t
else
if,var,var9,,=,5
image,85,44,moonphase\Moon5.bmp,t
else
if,var,var9,,=,6
image,85,44,moonphase\Moon6.bmp,t
else
if,var,var9,,=,7
image,85,44,moonphase\Moon7.bmp,t
endif
endif
endif
endif
endif
endif
endif
endif
changefont,tahoma,11,
//Puts Date on today screen
changefont,tahoma,24,b
color,font,192_192_192
time,65,-1,-1,5,cs,"dddd",
changefont,tahoma,13,
color,font,255_255_0
time,65,20,-1,5,cs,"d MMMM,yyyy"
changefont,tahoma,11,
color,font,255_0_0
//Puts month calendar and update time on today screen
load,city,%var0%
text,24,35,Updated:,l
text,85,35,[updatetime],c,hh:mm:tt
color,font,255_0_0
changefont,tahoma,12,b
color,font,255_255_0
imagebutton,128,12,reset.png,t,-1,10,0,0
imagebutton,142,0,right_arrow.png,t,-1,8,1,0
button,142,0,11,11,-1,8,0
imagebutton,128,0,left_arrow.png,t,-1,9,0,0
button,128,0,11,11,-1,9,1
changefont,tahoma,11,b
calendarheader,153,9,12
//Red Saturday
color,font,255_0_0
text,155,9,S,l
//Red Sunday
color,font,2_11_251
text,227,9,S,l
changefont,tahoma,10,
color,font,-1_4_-1
calendar,0,0,153,20,12,8,l
color,font,-1_4_-1
changefont,tahoma,12,b
text,160,0,[caldate],0,l,"MMMM, yy"
//Puts owner info on today screen
changefont,tahoma,13,b
text,1,45,%owner name%,l
changefont,tahoma,12,
text,1,56,%owner phone%,l
//Puts Memory and Brightness shortcut on desktop
shortcut,126,24,Memory,s
button,126,24,16,16,-1,0,%Memory,
//shortcut,114,29,Brightness,s
//button,114,29,16,16,-1,0,%Brightness,
offsetadd,0,68
endregion,0,0
Looks like you are not initializing the var9 before you use it. Add this line to your code:
initvar,var9,0
calcvar,var9,moonphase
if,var,var9,,=,0
image,85,44,moonphase\Moon0.bmp,t
else
...
I omited most the code to save sapce. That should do it since you definately need the initvar line for it to work. :D
Tryed your code in my skin and it worked fine ????
I didn't use the initvar-command too and it works for me.
Try to put thee moon.. bmps in your imcages/colors-3d-folder and use
the text i've changed (position of the moonpic). (see attachment)
looks a little strange on my PPC but it works:
!!! The txt-file is no complete skin, it is only a piece of region 0 from Joel,
that I copied in the skin I use ! So this does'nt work correctly as a complete
skin !!!
Quote from: joelw135No luck there either, Here is my skin region 0 please look and see if I am missing anything.
I've put this skin on my pda, but I did get a blank screen. So, there must be something wrong in this skin, but I really don't know what...
Quote from: BarbarosLooks like you are not initializing the var9 before you use it. Add this line to your code:
initvar,var9,0
calcvar,var9,moonphase
...
I also tried this in my slider, but it did't work either.
Do you know what I think? Maybe, the moonfase command isn't well implemented in the TodayPlus.exe file. And that's: work for the mysterious mr. SRS, I assume.
Quote from: Timmy
I've put this skin on my pda, but I did get a blank screen. So, there must be something wrong in this skin, but I really don't know what...
Well Timmy, that was no complete skin but only a piece of the region 0,
so that can't work as a skin !
Greetings Broesel
Thanks, that worked with a few changes to the X & Y . At least I know it wasn't the skin.
I resized the images to 15 x 15 to match the sunrise and sunset.
Yes, looks nice now,
did you make the moonpics smaller ?
Greetings Broesel
Yes I made them 15 X 15
Quote from: BroeselQuote from: Timmy
I've put this skin on my pda, but I did get a blank screen. So, there must be something wrong in this skin, but I really don't know what...
Well Timmy, that was no complete skin but only a piece of the region 0,
so that can't work as a skin !
Greetings Broesel
You are wright, Broesel! But I put your piece in my own slider, but it didn't work. I'm pitty for that, for I do want my screen like the following picture. (Note, that the moonphase isn't working: it's only a picture!!!)
Quote from: BroeselTryed your code in my skin and it worked fine ????
I didn't use the initvar-command too and it works for me.
Try to put thee moon.. bmps in your imcages/colors-3d-folder and use
the text i've changed (position of the moonpic). (see attachment)
looks a little strange on my PPC but it works:
!!! The txt-file is no complete skin, it is only a piece of region 0 from Joel,
that I copied in the skin I use ! So this does'nt work correctly as a complete
skin !!!
I did it also and it works for me (just put this code in my slider).
But I initialised var9 (it is one of the few things I remember from my university course... always initialise variables ! :shock: )
I am sorry joelw135, I cannot understand how it is possible to let it work in your skin. Really seems to be a problem related to the refresh... I will try to study a bit your problem.
Quote from: Timmy
You are wright, Broesel! But I put your piece in my own slider, but it didn't work. I'm pitty for that, for I do want my screen like the following picture. (Note, that the moonphase isn't working: it's only a picture!!!)
Sorry, but I don't know, where your problem is. I putted the code into
the original slider.txt and tried a little to fit it like you wanted. This is, what I
get:
(attached also the changed slider.txt)
Greetings Broesel
I had posted on page one that it works fine. So I have no problem with the code, now that I have the new code from Broesel.
I got it working with my skin too, it looks great thanks you guys.
I have it alternating with the sun up/down.
(http://members.chello.nl/~o.ozturk/screen3.gif)
What code did you use to alternate the moon and sun?
Quote from: YogimanI got it working with my skin too, it looks great thanks you guys.
I have it alternating with the sun up/down.
Hi Yogiman:
Can you post your skin?
LawofA
Quote from: Broesel
Sorry, but I don't know, where your problem is. I putted the code into
the original slider.txt and tried a little to fit it like you wanted. This is, what I get:
(attached also the changed slider.txt)
Broesel, thank you for your help. Your screendump tells me that you have what I want.
But: please, will you send the good 'slider.txt' to this forum, because the one I downloaded is not the slider of the showed picture (and has no 'moon' and 'sun' in it). Thanks!!!
A little bit changed sunrise.png and sunset.png are attached.
Quote from: Timmy
Broesel, thank you for your help. Your screendump tells me that you have what I want.
But: please, will you send the good 'slider.txt' to this forum, because the one I downloaded is not the slider of the showed picture (and has no 'moon' and 'sun' in it). Thanks!!!
Sorry Timmy, you are right, got the wrong slider.txt copied.
(I deleted the one I posted before)
Here is the one you wanted: (edited: deletet attachement, because i could not upload any more files)
Greetings Broesel
Hey guys,
thanks for all.
I could do some job for our italian friends and not only, I hope... 8)
http://www.dark-mojo.com/todayplus/viewtopic.php?p=5706#5706
Best Wishes
Quote from: BroeselQuote from: Timmy
Broesel, thank you for your help. Your screendump tells me that you have what I want.
But: please, will you send the good 'slider.txt' to this forum, because the one I downloaded is not the slider of the showed picture (and has no 'moon' and 'sun' in it). Thanks!!
Sorry Timmy, you are right, got the wrong slider.txt copied.
(I deleted the one I posted before)
Here is the one you wanted:
Greetings Broesel
Everything works perfect now! Thank you for your good help!!!
I've imported your 'moon'-section in my own slider, and from the beginning everything was all-right. Thanks!
This is the code in my skin to get the alternating moon en sun.
region,7,0,-1
image,190,1,sunrise.png,
suntime,1,sunrise,official,214,2,HH:mm,,,l
image,190,15,sunset.png,
suntime,1,sunset,official,214,14,HH:mm,,,l
endregion,7,0
region,7,100,-1
calcvar,var9,moonphase
if,var,var9,,=,0
image,200,15,Moon0.bmp,t
else
if,var,var9,,=,1
image,200,2,Moon1.bmp,t
else
if,var,var9,,=,2
image,200,2,Moon2.bmp,t
else
if,var,var9,,=,3
image,200,2,Moon3.bmp,t
else
if,var,var9,,=,4
image,200,2,Moon4.bmp,t
else
if,var,var9,,=,5
image,200,2,Moon5.bmp,t
else
if,var,var9,,=,6
image,200,2,Moon6.bmp,t
else
if,var,var9,,=,7
image,200,2,Moon7.bmp,t
endif
endif
endif
endif
endif
endif
endif
endregion,7,100
suntime,1,elevation,,133,15,%05.2f,Ele: ,°,l
initvar,var13,0
if,var,var13,,=,0
jumpregion,7,0
storevar,var13=1
else
jumpregion,7,100
storevar,var13=0
endif
Quote from: LawofAQuote from: YogimanI got it working with my skin too, it looks great thanks you guys.
I have it alternating with the sun up/down.
Hi Yogiman:
Can you post your skin?
LawofA
Hi,
you can find it here: http://www.dark-mojo.com/todayplus/viewtopic.php?t=1121
Yogi
Here is a sample code using the imagemeter command to display the moon phases.
calcvar,var30,moonphase,1
calcvar,var30,*,%var30%,25
imagemeter,0,0,%var30%,moon phases.png,tr,0,200
var30 is multiplied by 25 because this is the size of each moon image within the png file (which is 200x25 pixels in size).
For the imagemeter command, the format is:
imagemeter,<x>,<y>,<current value>,<image name>,<image options>,<min value>,<max value>
Below is the image file to use (Broesel's png file with some corrections).
EDIT: Here is the correct implementation of the imagemeter command (thanks srs).
calcvar,var30,moonphase,1
imagemeter,0,0,%var30%,moon phases.png,tr,0,7
Here is a pick of LTwisted Version 0.11.0 with sun/moon data.
Here are some of the new stuff.
Full png icons for the weather and new moon and sun icons with full png support looks so much better then .bmp's. Icons i have made.
Sun icons only display when the sun is out, 10 diffrent sun icons to go with the sun elevation.
Brightness added to battery+
these are just some of the new things. I will be posting it latter tonight with the new icons and such.
oh by the way you shuldnt use var9 for you'r moon data becouse var9 is used in the weather region.
Thanks Lordtwisted
Yes Lordtwisted, that looks really nice ....
can't await to try your new skin ....
Greetings Broesel
I've got weather and etc. for two cities:
Burtonsville, MD, 20866, 39.0787,-76.93307
New York, NY, 10012, 40.72553,-73.99828
For those in other countries, these two cities are <300 miles apart on the east coast of the US. Today, T+ is showing that they have the same moon visibility, but showing different moon phases.
(http://home.comcast.net/~madtxn/todayplus/moon.jpg)
Any ideas? Cuz I'm pretty sure this isn't correct. But I could be wrong. Oh yeah, here's the relavant code:
load,city,%var6%
calcvar,var18,moonphase,%var6%
imagemeter,0,0,%var18%,moon_phases.png,r,0,7
moontime,%var6%,rise,official,26,2,HH:mm,,,l
moontime,%var6%,set,official,26,16,HH:mm,,,l
moontime,%var6%,visible,,0,30,,, % visible,l
Quote from: LordtwistedHere is a pick of LTwisted Version 0.11.0 with sun/moon data. Here are some of the new stuff.
I will be posting it latter tonight with the new icons and such.
Little question: I suppose, your latest skin with the moonphases isn't posted yet?
Hmmm... same stuff here, MT
Although I'm using Broesel's moon code (not using the image variable).
As you can see, Everett WA and Key West FL, are far apart...but not THAT FAR!
Hmmm... might it have something to do with Lat?
No, because Moon 3 (Flagstaff) shows the same as Everett, not Key West...
dp1don
Timmy, no i didn't relese it yet, becouse i am adding some new ideas. I was going to post it and thought of something else i should have it up by tomorrow.
Lordtwisted :D