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
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  HAVE_LCD_CHARCELLS and shutdown menu for e200
« previous next »
  • Print
Pages: [1]

Author Topic: HAVE_LCD_CHARCELLS and shutdown menu for e200  (Read 2222 times)

Offline TheMarkster

  • Member
  • *
  • Posts: 6
HAVE_LCD_CHARCELLS and shutdown menu for e200
« on: May 09, 2008, 02:43:11 PM »
I'm new to this, so bear with me if this is not the right board.

I thought it would be nice to have a shutdown option in the main root menu for my player (sansa e260v1).  When I started looking over the source code I noticed there already was code for a shutdown option in the main menu, but it wasn't showing up in my player.  (This would be in apps/rootmenu.c.)  The problem seems to be that the code for the shutdown option is surrounded by

#ifdef HAVE_LCD_CHARCELLS
...
#endif

and hence isn't being compiled for my player.

I discovered that by commenting out the #ifdef ... #endif and by converting the line

    MENUITEM_FUNCTION(do_shutdown_item, 0, ID2P(LANG_SHUTDOWN),
                  do_shutdown, NULL, NULL, Icon_NOICON);


to


    MENUITEM_FUNCTION(do_shutdown_item, 0, "Shutdown",
                  do_shutdown, NULL, NULL, Icon_NOICON);


I was able to get the source to compile and work on my e200 series player. 

My question is: what exactly does having  HAVE_LCD_CHARCELLS defined mean?  Especially, why would having it defined preclude having a shutdown option in the menu?  In other words, why check for HAVE_LCD_CHARCELLS in the first place concerning having a shutdown menu option?

My workaround seems to be working just fine with the exception that the player boots into the settings menu rather than into the main menu on powerup.  (Play/Pause gets me to WPS and the bottom button below the scroll wheel gets me back to the main menu.)
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: HAVE_LCD_CHARCELLS and shutdown menu for e200
« Reply #1 on: May 09, 2008, 03:08:15 PM »
http://www.rockbox.org/tracker/task/6733

I believe the have-charcells if-block refers to the Archos units, who perhaps don't have a way of shutting down gracefully via a keypress?

As for the start screen, there is an option in the settings to choose which screen to open on, and you probably have it set to "Settings".
« Last Edit: May 09, 2008, 03:32:51 PM by MarcGuay »
Logged

Offline TheMarkster

  • Member
  • *
  • Posts: 6
Re: HAVE_LCD_CHARCELLS and shutdown menu for e200
« Reply #2 on: May 09, 2008, 05:23:02 PM »
Thanks for the reply, and for the link to the task tracker, and for the tip on the startup screen option.  I'm now back to starting up at the main menu as before.  You saved me the grief of trying to figure out how my hack had goofed up the start screen.
Logged

Offline pixelma

  • Rockbox Expert
  • Member
  • *
  • Posts: 645
Re: HAVE_LCD_CHARCELLS and shutdown menu for e200
« Reply #3 on: May 12, 2008, 06:02:46 PM »
Quote from: MarcGuay on May 09, 2008, 03:08:15 PM
I believe the have-charcells if-block refers to the Archos units, who perhaps don't have a way of shutting down gracefully via a keypress?
I think the reason you gave here is correct but its not valid for all "Archos units".
It only refers to the one line of Archos targets - the "Player/Studio", the first two on the DeviceChart wiki - which happens to be the only target with a so called "charcell" display. Other Archos units like e.g. my Ondio can be shut down gracefully without an option and so doesn't have this. I can imagine that this is the reason one chose to wrap it into this define even though it might not be the "clean" way.

About such an option in general: if I can shut down a player by pressing one button (even if it's two long presses in a row) thus quite comfortably, I wouldn't want an option in the menu for it because: pressing one button is quicker than bringing up the menu, navigate to the option and select it; I'd like to avoid accidentally shutting down my player by chosing a wrong "menu item"; it clutters up the menu unnecessarily (as if Rockbox wouldn't have enough options, setttings...). I only speak for myself here though.
Logged

Offline TheMarkster

  • Member
  • *
  • Posts: 6
Re: HAVE_LCD_CHARCELLS and shutdown menu for e200
« Reply #4 on: May 13, 2008, 07:28:04 AM »
On my player (e200) sometimes the shut down via the power button doesn't respond the way I'd like.  At times I have to hold it down so long that the hardware powers down, bypassing the auto bookmark creation.  That's why I put the shutdown menu option in there in my custom build.  Besides that, rockbox boots back up in short order, so an accidental shutdown is not a biggie, especially if you have auto bookmarking on.

One thing I can't figure out is how to get the player to speak the new menu option.  I don't use the voice menus, but I'd still like to get it to work.  I should probably create a new thread, though.
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: HAVE_LCD_CHARCELLS and shutdown menu for e200
« Reply #5 on: May 13, 2008, 08:22:22 AM »
Check out the patch I pointed to in the tracker, I think it added voice capability.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  HAVE_LCD_CHARCELLS and shutdown menu for e200
 

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

Page created in 0.075 seconds with 15 queries.