Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: xpmule on October 13, 2012, 01:50:22 PM

Title: [Request] Fuze+ default FMS config
Post by: xpmule on October 13, 2012, 01:50:22 PM
Trying to find the .fms data for the fuze+
it seems to be set in the source code.. no file exists.
i looked around in the (git) source and can't find anything
but fms files for other targets.
i only want add a strip of icons along the top blank space
so it matches my theme i made.
Title: Re: [Request] Fuze+ default FMS config
Post by: JdGordon on October 13, 2012, 08:00:44 PM

%s%?Ti<%Ti. |>%?Tn<%Tn|%Tf>
%Sx(Station:) %tf MHz
%?St(force fm mono)<%Sx(Force Mono)|%?ts<%Sx(Stereo)|%Sx(Mono)>>
%Sx(Mode:) %?tm<%Sx(Scan)|%Sx(Preset)>
%Sx(Signal strength:) %tr dBuV
%pb
Title: Re: [Request] Fuze+ default FMS config
Post by: xpmule on October 13, 2012, 08:49:03 PM
lol thanks

i just came back to say i found it using a debugger and reading the memory

Code: [Select]
%s%?Ti<%Ti. |>%?Tn<%Tn|%Tf>
%Sx(Station:) %tf MHz
%?St(force fm mono)<%Sx(Force Mono)|%?ts<%Sx(Stereo)|%Sx(Mono)>>
%Sx(Mode:) %?tm<%Sx(Scan)|%Sx(Preset)>
%Sx(Signal strength:) %tr dBuV
%pb

%s%ty
%s%tz


if i create an fms file with that in it it looks just like the default no problems..
but i tried adding my strip of icons along the top and they show up but the fm data does not.
so i think obviously i have a viewport problem that i'm trying to sort out.

honestly find the viewport code sometimes confusing :(
Maybe someone can see what i'm doing wrong if i post my fms config ?
would be nice to get this working its the last thing i'm gonna do
before i pack it all up and try and share it etc

my NON working code (the part at the bottom needs viewport code @ Radio Data section)
It's updated and working now :)
Code: [Select]

%Vi(-,0,20,-,-,1)

# - Images
%xl(A,lock.bmp,0,0,2)
%xl(B,battery.bmp,0,0,22)
%xl(C,volume.bmp,0,0,20)
%xl(D,shuffle.bmp,0,0,2)
%xl(E,repeat.bmp,0,0,5)
%xl(F,playmode.bmp,0,0,5)

# - Time (w/ brighter font color)
%V(13,0,66,18,-)%Vf(999999)%Vb(000000)
%?ca<%al%?cf<%cH:%cM|%cl:%cM>|00:00>

# - Lock
%V(56,3,21,13,-)
%?mh<%xd(Aa)|%xd(Ab)>

# Volume
%V(91,4,20,11,-)
%?pv<%xd(Ca)|%xd(Cb)|%xd(Cc)|%xd(Cd)|%xd(Ce)|%xd(Cf)|%xd(Cg)|%xd(Ch)|%xd(Ci)|%xd(Cj)|%xd(Ck)|%xd(Cl)|%xd(Cm)|%xd(Cn)|%xd(Co)|%xd(Cp)|%xd(Cq)|%xd(Cr)|%xd(Cs)|%xd(Ct)>

# - Shuffle
%V(125,4,16,11,-)
%?ps<%xd(Da)|%xd(Db)>

# - Repeat
%V(155,3,11,13,-)
%?mm<%xd(Ea)|%xd(Eb)|%xd(Ec)|%xd(Ed)|%xd(Ee)>

# - Play Mode
%V(180,3,12,13,-)
%?mp<%xd(Fa)|%xd(Fb)|%xd(Fc)|%xd(Fd)|%xd(Fe)>

# - Battery
%V(205,4,20,11,-)
%?bp<%ar%?bc<%xd(Ba)|%xd(Bb)>|%?bl<|%xd(Bc)|%xd(Bd)|%xd(Be)|%xd(Bf)|%xd(Bg)|%xd(Bh)|%xd(Bi)|%xd(Bj)|%xd(Bk)|%xd(Bl)|%xd(Bm)|%xd(Bn)|%xd(Bo)|%xd(Bp)|%xd(Bq)|%xd(Br)|%xd(Bs)|%xd(Bt)|%xd(Bu)|%xd(Bv)>>

# - Radio Data
%V(0,20,240,18,-)
%s%?Ti<%Ti. |>%?Tn<%Tn|%Tf>

%V(0,38,240,18,-)
%Sx(Station:) %tf MHz

%V(0,56,240,18,-)
%?St(force fm mono)<%Sx(Force Mono)|%?ts<%Sx(Stereo)|%Sx(Mono)>>

%V(0,74,240,18,-)
%Sx(Mode:) %?tm<%Sx(Scan)|%Sx(Preset)>

%V(0,92,240,18,-)
%Sx(Signal strength:) %tr dBuV

%V(0,110,240,18,-)
%pb

%V(0,146,240,18,-)
%s%ty
%V(0,164,240,18,-)
%s%tz


Thanks again for the help JdGordon and if anyone has any advice what i can do
to get the exact default fms code to work with my strip of status icons along the top that would be great :)

edit:
I updated my other new theme topic with some final version pictures
to show exactly what I'm after. (it shows what i mean by icons strip at top)

edit(2):
I managed to replicate the default Fuze+ FMS config. (compared and accurate to the pixel)
I put the correct fixed code in the code tags above starting at line #47, # Radio Data"
Title: Re: [Request] Fuze+ default FMS config
Post by: [Saint] on October 15, 2012, 12:30:28 AM
I'm wondering how this works...

Code: [Select]
%?ca<%al%?cf<%cH:%cM|%cl:%cM>|00:00>

I believe what you were going for is:

Code: [Select]
%?cc<%al%?cf<%cH:%cM|%cl:%cM>|00:00>


Your code checks for the abbreviated weekday, then checks the 12/24hr time display preference and displays the correctly formatted time if it is a Sunday, and displays 00:00 if it is a Monday, and ignores all other days of the week.

In summary:
%ca == Abbreviated weekday (Sun, Mon, Tue, Wed, ...)
%cc == Is there a Real-Time Clock present?

One tag can make a huge difference... ;)


[Saint]
Title: Re: [Request] Fuze+ default FMS config
Post by: xpmule on October 21, 2012, 10:14:22 PM
so i think you found a bug lol
since it always returns true (why i have no idea)
it works as i wanted anyway.
but I think i understand what you said though
Abbreviated weekday = true ? (unpredictable result !)
Real-Time Clock exists = true ? (*should be true always on fuze+)

I've been coding with c++ (*learning anyway) for a good 10 years
so i'm familiar with conditional statements and i can see how what you seen looks dumb lol
i'll have to look at any place i used the line you mentioned and changed it i guess ;)

also almost missed your reply because of the way the forum works lol
my last comment was appended to my previous making you the last commenter
then you commented again after my edit so.. confusing lol

oh and i have tested the clock code on my theme for both time formats
and it looks fine although the positioning is a pixel or two off depending on which one the user chooses.
and i only tried to make it show the time. not the day/month and not am/pm.