Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  [Request] Fuze+ default FMS config
« previous next »
  • Print
Pages: [1]

Author Topic: [Request] Fuze+ default FMS config  (Read 1834 times)

Offline xpmule

  • Member
  • *
  • Posts: 52
[Request] Fuze+ default FMS config
« on: October 13, 2012, 02: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.
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: [Request] Fuze+ default FMS config
« Reply #1 on: October 13, 2012, 09: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
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline xpmule

  • Member
  • *
  • Posts: 52
Re: [Request] Fuze+ default FMS config
« Reply #2 on: October 13, 2012, 09: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"
« Last Edit: October 14, 2012, 07:05:37 AM by xpmule »
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: [Request] Fuze+ default FMS config
« Reply #3 on: October 15, 2012, 01: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]
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline xpmule

  • Member
  • *
  • Posts: 52
Re: [Request] Fuze+ default FMS config
« Reply #4 on: October 21, 2012, 11: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.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  [Request] Fuze+ default FMS config
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.075 seconds with 15 queries.