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
| |-+  User Interface and Voice
| | |-+  Auto config loading or theme loading on mode switch...
« previous next »
  • Print
Pages: [1] 2

Author Topic: Auto config loading or theme loading on mode switch...  (Read 6189 times)

Offline yegods

  • Member
  • *
  • Posts: 71
Auto config loading or theme loading on mode switch...
« on: August 23, 2007, 05:53:41 PM »
i was working on a new feature, which was to be a setting for car mode versus unplugged.  it would load a user chosen theme whenever this mode changed.  i.e. you could select one theme for when you're plugged into the car, and one for when you're unplugged walking around.

i have the feature working, but then i'm thinking... why not extend the feature to load the whole config file on mode switch.  i.e. instead of selecting an unplugged theme, you select an unplugged config file.

what do you think?  which feature seems more useful?  which if any would you use?
Logged

Offline Febs

  • Member
  • *
  • Posts: 2701
Re: Auto config loading or theme loading on mode switch...
« Reply #1 on: August 23, 2007, 06:40:24 PM »
I'd like to see the whole .cfg, rather than just a theme.  I have a car eq, for example, that I could have automatically loaded, and I also always set the volume to 0 dB in the car.
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way
Please do not send me support questions via PM.

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Auto config loading or theme loading on mode switch...
« Reply #2 on: August 23, 2007, 07:48:44 PM »
There's no difference between a .cfg and a theme beyond which folder it looks for them in, though. No reason at all not to allow a .cfg to be loaded, since one of those can always set a theme anyway.
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Auto config loading or theme loading on mode switch...
« Reply #3 on: August 24, 2007, 03:58:13 AM »
Wouln't it be easier to have two config files, one of which includes 'car adapter mode' and the other that doesn't?

It's no more difficult (in fact probably quicker) to pick a new config than it is to change the Car Adapter Mode.

Seems like a solution looking for a problem to me...

Either:
Settings > Browse Themes or
Settings > Manage Settings > Browse .cfg files

Vs:
Settings > General Settings > System > Car Adapter Mode
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline yegods

  • Member
  • *
  • Posts: 71
Re: Auto config loading or theme loading on mode switch...
« Reply #4 on: August 24, 2007, 12:43:41 PM »
Quote
Wouln't it be easier to have two config files, one of which includes 'car adapter mode' and the other that doesn't?

actually no, (i mean, yes that's how it would work), the idea is that the car adapter mode sensor would automatically load the config file appropraite for whichever mode you enter.  i.e. when you unplug your player from the car, then it loads the "unplugged" config file.  no extra work needed.

the only work to be done would be to select which config files go with which mode.  i already have most of the code to do that -- but currently it is "theme" based.  i'll work on changing that.
Logged

Offline psycho_maniac

  • Member
  • *
  • Posts: 814
    • MyWebPage
Re: Auto config loading or theme loading on mode switch...
« Reply #5 on: September 03, 2007, 12:20:26 AM »
Quote from: bascule on August 24, 2007, 03:58:13 AM
Wouln't it be easier to have two config files, one of which includes 'car adapter mode' and the other that doesn't?

It's no more difficult (in fact probably quicker) to pick a new config than it is to change the Car Adapter Mode.

Seems like a solution looking for a problem to me...

Either:
Settings > Browse Themes or
Settings > Manage Settings > Browse .cfg files

Vs:
Settings > General Settings > System > Car Adapter Mode

this is what i do for when i want to play a album or just songs in my downloaded folder.
Menu>settings>Browse themes>xxx.config
xxx is
alpha.cfg - list songs alphabetically
new.cfg - list songs by newest date
car.cfg - certain car settings i have selected
this is very easy for me i just put it in themes because its less clicks i have to do
Logged
Please SEARCH the wiki | Please read the Forum Guidelines | Please Read the Manual
I Own A Gigabeat F80

Offline Genre9mp3

  • Artist
  • Member
  • *
  • Posts: 146
Re: Auto config loading or theme loading on mode switch...
« Reply #6 on: September 03, 2007, 01:08:18 PM »
Quote from: yegods on August 24, 2007, 12:43:41 PM
actually no, (i mean, yes that's how it would work), the idea is that the car adapter mode sensor would automatically load the config file appropraite for whichever mode you enter.  i.e. when you unplug your player from the car, then it loads the "unplugged" config file.  no extra work needed.

What do you mean by "car adapter mode sensor"?

There's not such thing... There's only a car adapter mode setting (which can be stored in a .cfg file like any other setting btw) that makes your player act differently on DC power detection (automatically start/stop the player).

I just don't quite get what you are trying to do there...
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Auto config loading or theme loading on mode switch...
« Reply #7 on: September 03, 2007, 02:39:56 PM »
I think he's coding an auto-detect function...
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline yegods

  • Member
  • *
  • Posts: 71
Re: Auto config loading or theme loading on mode switch...
« Reply #8 on: September 04, 2007, 03:47:30 PM »
Quote
What do you mean by "car adapter mode sensor"?

There's not such thing... There's only a car adapter mode setting (which can be stored in a .cfg file like any other setting btw) that makes your player act differently on DC power detection (automatically start/stop the player).

there is a card adapter mode sensor... in apps/misc.c.  the sensor is based on receiving "SYS_CHARGER_CONNECTED", and "SYS_CHARGER_DISCONNECTED" events.  this is how the global setting "car adaptor mode" is used.  i want to make the functions that "pause" and "play" for "car adaptor mode" do a little more work. i.e. load a specific cfg file for each mode.

i have it mostly working, but there are some bugs that i haven't figured out yet, so i haven't posted the patch.
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Auto config loading or theme loading on mode switch...
« Reply #9 on: September 04, 2007, 04:41:32 PM »
This isn't a "Car adapter mode sensor" this is a "Charger connection sensor". Not all chargers are car adapters, and using terminology to suggest either that they are, or that you think these values relate only to car adapters will confuse future discussions (as you've already seen by someone not knowing what you were talking about due to your misuse of terms).
Logged

Offline Febs

  • Member
  • *
  • Posts: 2701
Re: Auto config loading or theme loading on mode switch...
« Reply #10 on: September 04, 2007, 05:22:07 PM »
To be fair, I think that his use of that term probably comes from the fact that we already call this feature "Car adaptor mode."
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way
Please do not send me support questions via PM.

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Auto config loading or theme loading on mode switch...
« Reply #11 on: September 04, 2007, 05:35:51 PM »
Yes, but there are other features focused around the charger insertion detection (backlight on when charger inserted, for example) that have nothing to do with car adapter mode. There is the one function for "car adapter processing" but this is not a sensor, this is a function that is called any time *any* charger is connected, and is in no way a car adapter sensor.

The sensor aspect is "charger inserted" rather than "car adapter inserted".
Logged

Offline yegods

  • Member
  • *
  • Posts: 71
Re: Auto config loading or theme loading on mode switch...
« Reply #12 on: September 04, 2007, 07:26:14 PM »
Quote
The sensor aspect is "charger inserted" rather than "car adapter inserted".

not quite true, since the SYS_USB_CONNECTED also functions as a "charger inserted", and SYS_CHARGER_CONNECTED is not called in that event (due to the boot into Apple FW?).  This may change when the Rockbox USB mode is in?

yes i realize the actual event is not for "car adapter mode", but the function that is called when the event occurs IS called "car_adapter_mode_processing", so that's the term i used.
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Auto config loading or theme loading on mode switch...
« Reply #13 on: September 04, 2007, 07:50:42 PM »
Have you looked at the code for other players? I'm talking in a more abstract sense than "just iPods" and I fear you're thinking of them, since otherwise you'd be implying that all players have USB charging (they do not).

While car_adapter_mode_processing happens, it is not the only thing that happens when a charger is inserted and the charger is what is detected, not a car adapter.
« Last Edit: September 04, 2007, 07:52:56 PM by Llorean »
Logged

Offline yegods

  • Member
  • *
  • Posts: 71
Re: Auto config loading or theme loading on mode switch...
« Reply #14 on: September 04, 2007, 08:01:25 PM »
all the code for "car adaptor mode" is surrounded by #ifdef CONFIG_CHARGING... this includes the actual case statement for SYS_CHARGER_CONNECTED and SYS_CHARGER_DISCONNECTED... so it's pretty easy to see why they're related if not identical in my mind, and anyone's mind who has looked at the piece of the code.
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  User Interface and Voice
| | |-+  Auto config loading or theme loading on mode switch...
 

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

Page created in 0.103 seconds with 14 queries.