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
| |-+  Feature Ideas
| | |-+  day / night mode by hour
« previous next »
  • Print
Pages: 1 [2] 3 4

Author Topic: day / night mode by hour  (Read 12052 times)

Offline whiskers75

  • Member
  • *
  • Posts: 100
  • github.com/whiskers75
    • whiskers75
Re: day / night mode by hour
« Reply #15 on: January 03, 2013, 07:31:03 AM »
Quote from: JdGordon on January 03, 2013, 05:50:09 AM
rb->global_settings
Still think it's easier in main.c. I might want to start up chopper.rock while running day/night - with plugins I can't do that.
Logged
whiskers75/rockbox - Custom Build  
http://forums.rockbox.org/index.php/topic,42527.0.html
Devices: Sansa Clip+

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: day / night mode by hour
« Reply #16 on: January 03, 2013, 07:32:38 AM »
suit yourself, but it is very unlikely to be accepted (if you care) unless its a plugin.
Logged


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

Offline whiskers75

  • Member
  • *
  • Posts: 100
  • github.com/whiskers75
    • whiskers75
Re: day / night mode by hour
« Reply #17 on: January 03, 2013, 08:59:41 AM »
Quote from: JdGordon on January 03, 2013, 07:32:38 AM
suit yourself, but it is very unlikely to be accepted (if you care) unless its a plugin.
I don't.  :)
Logged
whiskers75/rockbox - Custom Build  
http://forums.rockbox.org/index.php/topic,42527.0.html
Devices: Sansa Clip+

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: day / night mode by hour
« Reply #18 on: January 03, 2013, 01:43:54 PM »
Why not?  Why not help other people out?
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline whiskers75

  • Member
  • *
  • Posts: 100
  • github.com/whiskers75
    • whiskers75
Re: day / night mode by hour
« Reply #19 on: January 04, 2013, 04:55:54 AM »
OK, I'm doing it in a plugin. My knowledge of Lua is better than my knowledge of C.
Logged
whiskers75/rockbox - Custom Build  
http://forums.rockbox.org/index.php/topic,42527.0.html
Devices: Sansa Clip+

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: day / night mode by hour
« Reply #20 on: January 04, 2013, 01:45:56 PM »
Can you do TSR plugins in lua?
Logged

Offline whiskers75

  • Member
  • *
  • Posts: 100
  • github.com/whiskers75
    • whiskers75
Re: day / night mode by hour
« Reply #21 on: January 06, 2013, 04:57:21 AM »
Turns out you can't.
Logged
whiskers75/rockbox - Custom Build  
http://forums.rockbox.org/index.php/topic,42527.0.html
Devices: Sansa Clip+

Offline whiskers75

  • Member
  • *
  • Posts: 100
  • github.com/whiskers75
    • whiskers75
Re: day / night mode by hour
« Reply #22 on: January 07, 2013, 10:06:45 AM »
It's done!
Set dnenabled = 1, night = (24-hour clock hour at which to change brightness eg 22 for 10pm) and nightbright to a brightness value (eg 2) in the config file (? I think that should load such things into global_settings) to enable day/night support. Get the source from whiskers75/rockbox branch day/night.
Open pull request: https://github.com/whiskers75/rockbox/pull/2 - will go through if it works.

PLEASE NOTE THAT THIS IS HIGHLY EXPERIMENTAL AND MAY CAUSE YOUR PLAYER TO EXPLODE. MY ADVICE IS TO RoLo THE UPDATED BINARY FROM YOUR CURRENT VERSION.
Logged
whiskers75/rockbox - Custom Build  
http://forums.rockbox.org/index.php/topic,42527.0.html
Devices: Sansa Clip+

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: day / night mode by hour
« Reply #23 on: January 07, 2013, 02:29:09 PM »
We don't use github, so that pull request is pointless.  If you want it considered, upload it to our gerrit.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: day / night mode by hour
« Reply #24 on: January 07, 2013, 04:27:19 PM »
Quote from: whiskers75 on January 07, 2013, 10:06:45 AM
PLEASE NOTE THAT THIS IS HIGHLY EXPERIMENTAL AND MAY CAUSE YOUR PLAYER TO EXPLODE. MY ADVICE IS TO RoLo THE UPDATED BINARY FROM YOUR CURRENT VERSION.

Or it might not work at all. I've had a short look at what's in the pull request (not that this is going to get pulled -- as AlexP already said we're not using github). Have you actually tried it? At least the code I've seen will never work. You've mixed up code with preprocessor statements in a way that simply cannot work.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline rbhawaii

  • Member
  • *
  • Posts: 125
Re: day / night mode by hour
« Reply #25 on: January 07, 2013, 11:55:30 PM »
i just wanted to thank you all for your time and effort (so far) to making this happen.

if i can help further with anything please let me know how!

i hope the day night settings i provided earlier in the thread helped in some way.

happy new year!

Logged

Offline whiskers75

  • Member
  • *
  • Posts: 100
  • github.com/whiskers75
    • whiskers75
Re: day / night mode by hour
« Reply #26 on: January 08, 2013, 02:43:45 AM »
    It builds fine! The pull is from my repo branch day/ night to master, not yours.
rbhawaii: No problem.
« Last Edit: January 08, 2013, 03:04:24 AM by whiskers75 »
Logged
whiskers75/rockbox - Custom Build  
http://forums.rockbox.org/index.php/topic,42527.0.html
Devices: Sansa Clip+

Offline whiskers75

  • Member
  • *
  • Posts: 100
  • github.com/whiskers75
    • whiskers75
Re: day / night mode by hour
« Reply #27 on: January 08, 2013, 03:06:02 AM »
Quote from: bluebrother on January 07, 2013, 04:27:19 PM
Quote from: whiskers75 on January 07, 2013, 10:06:45 AM
PLEASE NOTE THAT THIS IS HIGHLY EXPERIMENTAL AND MAY CAUSE YOUR PLAYER TO EXPLODE. MY ADVICE IS TO RoLo THE UPDATED BINARY FROM YOUR CURRENT VERSION.

Or it might not work at all. I've had a short look at what's in the pull request (not that this is going to get pulled -- as AlexP already said we're not using github). Have you actually tried it? At least the code I've seen will never work. You've mixed up code with preprocessor statements in a way that simply cannot work.
Wouldn't that throw an error in the build?
I don't have a player with brightness so I can't test this.
Logged
whiskers75/rockbox - Custom Build  
http://forums.rockbox.org/index.php/topic,42527.0.html
Devices: Sansa Clip+

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: day / night mode by hour
« Reply #28 on: January 08, 2013, 06:00:39 AM »
Quote from: whiskers75 on January 08, 2013, 03:06:02 AM
Wouldn't that throw an error in the build?

You managed to accidentally hit on something without syntax errors.

I'd recommend learning some C first.
Logged

Offline whiskers75

  • Member
  • *
  • Posts: 100
  • github.com/whiskers75
    • whiskers75
Re: day / night mode by hour
« Reply #29 on: January 08, 2013, 06:17:40 AM »
Moved code into daynight.c to avoid conflict. Now I just need that code to be run every hour.
Logged
whiskers75/rockbox - Custom Build  
http://forums.rockbox.org/index.php/topic,42527.0.html
Devices: Sansa Clip+

  • Print
Pages: 1 [2] 3 4
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  day / night mode by hour
 

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

Page created in 0.105 seconds with 14 queries.