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 12053 times)

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: day / night mode by hour
« Reply #30 on: January 08, 2013, 07:27:35 AM »
Quote from: whiskers75 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.

Now you need that file to get actually compiled. By simply putting code in a new file you don't get it magically compiled. Furthermore, you need to code to be actually working. And last, simply running it every hour also isn't sufficient -- how is it supposed to behave if you turn off the player during day, then turn it on again at night -- if you're not turning it on at a new hour you'll need to wait until the next hour to change to night mode? That's not how people would expect this to work ...

And code building doesn't tell anything about it working :)
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: day / night mode by hour
« Reply #31 on: January 08, 2013, 07:27:55 AM »
The problem isn't a "conflict", it's that you don't understand the difference between "if" and "#if" in C. #if is a preprocessor directive that is resolved during compilation. Your code does nothing at all as a result.

We're not trying to deter you from contributing, but it appears that you don't actually know the basics of the C language, and are just copying things from other places. This is unlikely to result in anything that actually works in most cases.
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline rbhawaii

  • Member
  • *
  • Posts: 125
Re: day / night mode by hour
« Reply #32 on: January 08, 2013, 07:45:20 AM »
hi torne and everyone eles thanks for helping out , would you be able or willing to help bring this code to life, the way you think is best?  I almost get the feeling that whiskers75 is trying hard but is not getting the proper motivation.   i mean everyone wants to see this feature in rock box right? so why not help him out a little more then just telling him how hes doing it wrong. this is a very exciting feature for myself and many many rb users im sure, so lets all help each other as best as we can :)   
i know nothing anyone has said so far was to discourage anything or anyone.  i just get the feeling we can be helping each other "create  something"  and not just keep pointing out what someone did wrong.
i hope my message is not misread as mean or negative since it is not meant to come across that way.
kind regards
Logged

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: day / night mode by hour
« Reply #33 on: January 08, 2013, 08:04:06 AM »
Actually, very few people have expressed a desire to see this feature in Rockbox. :)

Programming is a complicated skill and parts of it have to be re-learnt for every language you use. There's no way to just tell you what the right thing to do here is without just writing the code for you, and nobody will learn anything significant from that. How hard someone is trying is nothing to do with whether they have the required skills to succeed. A book on C programming would be far more helpful than one of us explaining how to accomplish this particular task.
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline rbhawaii

  • Member
  • *
  • Posts: 125
Re: day / night mode by hour
« Reply #34 on: January 08, 2013, 08:24:53 AM »
Fair enough...
I cant say anything on this topic since i know nothing of it. So i take your word for it.

Im a computer technician and I have always come from a view point where if someone is trying to fix/build something and they need help then help them , and i always do in the most efficient manor and they are always grateful and the results are great. But maybe this does not apply to coding , oh well.

As far as the feature goes... it is a feature for people who drive with rockbox.  The auto day night feature is very popular on almost every gps i have ever seen.   i drive with rock box so much that i removed my car stereo and put 2 half din equalizers in its place.  i dont need the radio nor cds nor tiny usb drives. rockbox is the ultimate mp3 player for me (except for android where GMMP is the best ever so far-sorry but honest)

and not many people requesting it... I dont know if there are statistics out there but how many people who install and use rb are on these threads? my guess is 1%? I still think if they had the feature many would love it and be grateful for it :)
« Last Edit: January 08, 2013, 08:28:57 AM by rbhawaii »
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: day / night mode by hour
« Reply #35 on: January 08, 2013, 08:49:21 AM »
Quote from: rbhawaii on January 08, 2013, 08:24:53 AM
Im a computer technician and I have always come from a view point where if someone is trying to fix/build something and they need help then help them , and i always do in the most efficient manor and they are always grateful and the results are great. But maybe this does not apply to coding , oh well.

It does apply, and we're willing to help, but this code is not bad C, less than ideal C, or not in the right style. It's not C *at all*. There are much better places than these forums to learn about basic C programming.
Logged

Offline whiskers75

  • Member
  • *
  • Posts: 100
  • github.com/whiskers75
    • whiskers75
Re: day / night mode by hour
« Reply #36 on: January 08, 2013, 01:15:20 PM »
No, it's my fault, I don't know C.  ;)
What file do I need to edit to get it compiled, and how can I get it to run at boot and at every hour? Sorry for the trouble, I'm learning. This is my first project in C, and I hope to go on and do some more advanced stuff.
By the way, I bet any Rockbox developer on the forums could do this in a day. As I said, I'm a first-timer to C. (JavaScript FTW!)
« Last Edit: January 08, 2013, 01:31:13 PM by whiskers75 »
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 #37 on: January 08, 2013, 01:31:18 PM »
I think before you worry about what file to edit, you learn enough to know how you are going to edit it.
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 #38 on: January 08, 2013, 01:33:47 PM »
What file is it? C? Shell script?
I know bash.
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 #39 on: January 08, 2013, 01:38:19 PM »
Rockbox is written in C, with some assembler.
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 #40 on: January 08, 2013, 01:44:55 PM »
OK, let's try '[day/night 8190fe2] Alright, is this C?'.
I call update_dn(); in main.c, should I, or is there a better place to put that?
As always, build thingy:  (may be inaccurate, I need 32-bit arm-elf-eabi packages and building them is buggy)
(As you said, I'm stabbing about blindly in the dark. I'll read up on C)
« Last Edit: January 08, 2013, 01:49:34 PM by whiskers75 »
Logged
whiskers75/rockbox - Custom Build  
http://forums.rockbox.org/index.php/topic,42527.0.html
Devices: Sansa Clip+

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: day / night mode by hour
« Reply #41 on: January 08, 2013, 04:29:38 PM »
Quote from: whiskers75 on January 08, 2013, 01:44:55 PM
OK, let's try '[day/night 8190fe2] Alright, is this C?'.

No. That's something really weird.

Quote
I need 32-bit arm-elf-eabi packages and building them is buggy)

Huh? Building the toolchain using rockboxdev.sh is working fine since long. How come you consider it "buggy"?
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: day / night mode by hour
« Reply #42 on: January 09, 2013, 12:47:19 AM »
Quote from: whiskers75 on January 08, 2013, 01:15:20 PM
As I said, I'm a first-timer to C. (JavaScript FTW!)

So first step is to go learn c. Your javascript knowledge will not translate 100% to c. We'll be far more able to help once you actually know how to get things useful working in C. As it is now, any help from us would just be implementing it (which I think it clear we don't really want)
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 #43 on: January 09, 2013, 02:11:31 AM »
Quote from: bluebrother on January 08, 2013, 04:29:38 PM
Quote from: whiskers75 on January 08, 2013, 01:44:55 PM
OK, let's try '[day/night 8190fe2] Alright, is this C?'.

No. That's something really weird.

Quote
I need 32-bit arm-elf-eabi packages and building them is buggy)

Huh? Building the toolchain using rockboxdev.sh is working fine since long. How come you consider it "buggy"?
Since the build system I use can't run rockboxdev.sh as it has a 10 minute timeout per command.
Logged
whiskers75/rockbox - Custom Build  
http://forums.rockbox.org/index.php/topic,42527.0.html
Devices: Sansa Clip+

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: day / night mode by hour
« Reply #44 on: January 09, 2013, 02:16:22 AM »
If your build system cannot run rockboxdev.sh, you're doing it wrong. Fact.

I responded in another thread to your claims that rockboxdev.sh is buggy/broken/otherwise. Using other tools that break this doesn't make it broken in itself. It simply means you shouldn't be using those tools.



[Saint]
« Last Edit: January 09, 2013, 02:18:26 AM by [Saint] »
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

  • 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.122 seconds with 14 queries.