Forum: General Topics
Forums / General Topics / Automatic night mode
Subject: | Automatic night mode | |
shchenka 8:45 | I've paid some more attention recently to the automatic night mode switch and I'm surprised how nice this potentially minor feature is. I don't know about the others but would actually prefer it to turn to the night mode about half an hour earlier, so I thought I'd just make a note here. :) | |
ChrisM 10:24 Location: Phone Model: | I know Stephen has it set to switch over when the Sun is 6 degrees below the horizon which is officially 'Civil Twilight' or 'Lighting Up Time' , but I tend to agree that it might be better to happen when things are a little less dark... (maybe 5 degrees...?) Dunno, what do others think...? Chris. | |
Stephen 12:06 Location: Phone Model: | Yes, the Civil Twilight definition of -6 degrees seemed like a good starting threshold to use for switching between night/day, but I can easily change this (guess I could make it customisable, though this is probably overkill). I think its probably best to not overdo it - a 1 degree change is roughly equivalent to about 4 minutes at the equator at an equinox, but in Northern Europe in winter it would be nearer to 20 minutes (and even longer the further north you get). So, as Chris suggests, I could change it to -5 degrees in the next version and see how that goes... Any thoughts? Cheers, Stephen | |
shchenka 12:35 | I think changing it to -5 degs would be worth trying. From the practical point of view it seems better to err on the "night side", that is better have a couple of minutes of the the night mode in the daylight than the other way round. Also, cloudiness is a factor that might add to this at times, and make it dark sooner than expected. Having the daylight mode on when there's dark around is quite annoying, for me at least. Thanks for considering this, :) --sh | |
ChrisM 14:44 Location: Phone Model: | On the subject of night mode... When driving in the dark, the night mode screens are great. The only problem is the map screen, which usually has a bright white background(especially for maps taken from Goo... erm, certain online mapping sources...), and can be very dazzling. I don't imagine there is much that can be done about this as you are simply displaying the image you have been given, but just to raise the point for consideration, is there ANYTHING that could be done about this? I'm not even sure what to suggest as a possible alternative... inverting the colours(like a photo-negative) even if possible, would probably just look too weird... would it be possible to have a grey 'overlay' on top of the map to mute the colours? though that could possibly mask out some of the detail on the map(?) Anyone got any suggestions, IS there anything that can be done? Maybe not... Regards, Chris. PS. Just a thought... maybe it would be possible to do something with MapOrganiser...??? To generate a layer of tiles that were colour inverted, or reduced brightness at the point at which the .TMJ files were generated?? Don't know... might bloat the TMJ file too much actually?? | |
Stephen 18:31 Location: Phone Model: | Hi Chris, Interesting idea! My first reaction was to say that any processing would have to be done *before* creating the TMJ file, since J2ME provides no image contrast functions. However I've just done a quick test using the NokiaUI API (so far unused in TMJ, but provides a couple of extra graphics functions on some phones - Nokia and Sony Ericsson at least). This allows basic 'alpha' values to be used when drawing graphics - I have to say I'm quite impressed with your idea. By overlaying a black rectangle with 50%ish transparency the map is 'dulled' down nicely. It won't work on all phones but I'll certainly look into this a bit more. I've also added an 'Invert Image' option into the Map-Organiser (not yet released though) - took about two minutes to alter the Tools/Increase Contrast function! OSM maps etc do look a bit weird when inverted, but are still quite usable - in the meantime if you've got Photoshop, or similar, you could try inverting a map then converting it for TMJ - its quite a surreal effect! Cheers, Stephen | |
ChrisM 22:32 Location: Phone Model: | Stephen, Glad my idea might have some legs... Does 'dimming' the map by overlaying a rectangle hide any of the detail? I suppose it shouldn't, as you're only overlaying at 50% tranparency... I'd be interested to see how it looks though... maybe in a forthcoming release...? In the meantime, I'll have a play with inverting a map, to see what it looks like... If I create a map with one layer as normal, and one layer the same map but inverted, that might work... How difficult would it be to invert an existing TMJ file? Or to create a new inverted TMJ file from an existing one?? Cheers, chris. | |
Stephen 12:04 Location: Phone Model: | Hi Chris, The overlay in effect halves the Red, Green and Blue values for each pixel, so white becomes grey, lime green becomes dark green, etc. It does make the image look a bit flat/washed out, but this is kind of the intention I guess. Here's an example showing the Original, Inverted and Overlayed images: " If I create a map with one layer as normal, and one layer the same map but inverted, that might work " Yes, that'll do it (will obviously double the size of the *.tmj file but this shouldn't matter - TMJ can handle pretty large files). If you also want to simulate the overlay effect use the Photoshop or PaintShop Pro (if you have access to either of these) 'Levels' function to adjust the Output level to 0-127 (instead of the default 0-255). " How difficult would it be to invert an existing TMJ file? Or to create a new inverted TMJ file from an existing one?? " The bulk of the TMJ file is just a load of individual PNG files (for each tile) stuck together end-to-end so in principle these would need to be extracted, inverted, then combined together again. Nothing too complicated, but I don't really want to spend too much time on this at the moment! " I'd be interested to see how it looks though... maybe in a forthcoming release...? " Yes, I should be able to fit this into the next release - the test only needed 3 lines of code so shouldn't be too difficult!! Cheers, Stephen | |
ChrisM 16:43 Location: Phone Model: | Looks like the 'dimming-down of the map image might work! Will have a play with inverting some maps. Don't have either of the graphics packages you mention, but I'm sure I've got something buried on my laptop somewhere that'll do that sort of thing... Please don't waste ANY time on the 'changing an existing TMJ file' thing on my behalf. That was more of an idle curiosity type question, or maybe just a vague hope that you might already have a utility kicking around that could be used for that purpose... :-) Look forward to (hopefully) seeing the auto-dimming maps in the next version!! Keep up the excellent work. Regards, Chris. PS, I'm sure you already know, but I see there is some stuff in the Nokia UI API to control the backlight, though it doesn't sound all that clever... and I certainly don't have any problems with the way the backlight control works now anyway. | |
Stephen 9:40 Location: Phone Model: | " I see there is some stuff in the Nokia UI API to control the backlight " Actually, I forgot that TMJ does *already* use the Nokia UI API for doing precisely this, which is good since it should mean that any current version that has the backlight control enabled should also be able to run the map brightness reduction function as well! Incidentally I'm also adding an 'increase brightness' function which overlays a white transparent rectangle (instead of the black one). It essentially makes the map less prominent, allowing the track and waypoints to show up better... | |
ChrisM 12:55 Location: Phone Model: | Which Backlight 'Method' uses the Nokia API? Might give me an indication as to whether the map-dimming is going to work on my phone. Cheers, Chris. | |
Stephen 18:10 Location: Phone Model: | They all do! The reason for the different methods is that even after issuing the NokiaUI setLights() command some phones still turn the backlight off again after so many seconds. So some of the methods set the frequency that TMJ has to reissue the setLights() command in order to keep the light on (eg if a phone would otherwise turn the lights off after 30 seconds, then TMJ will issue the setLights() command every 25 seconds or so, which resets the phones timer). Also, some phones (eg my old W800) only seem to turn the lights back on if a setLights(0,0) is issued first, so some of the methods do this as well (which irritatingly makes the screen flicker every so often, but just about works)! All the Sony Ericsson builds include the NokiaUI so you should be fine on your phone. Its basically just the 'Generic' TMJ versions that don't include it, in which case there won't be any backlight methods listed in the Settings menu whatsoever. Cheers, Stephen | |
ChrisM 14:23 Location: Phone Model: | Just to say; Night mode works brilliantly now, was driving somewhere Saturday afternoon, and just as it was getting dark, the map suddenly dimmed... excellent stuff. Far less glare at night now. Chris. | |
Stephen 20:17 Location: Phone Model: | Jolly good - I went for -4 degrees in the end, figured that -5 was still a bit too low! | |
(You must be logged in to post a reply to this thread)