Archive for January, 2009

Firebug for Firefox

Wednesday, January 28th, 2009

*POST BROUGHT OUT OF BACKUPS*

Just a quick note to mention this amazing plugin for firefox (available here) It allows full debugging of web pages and on the fly editing of scripts, styles and layout – want to quickly show a client the same page in a different colour or header image etc? No longer will you have to edit the source, save and reload, just pop open firebug, change the line in the console and it updates the rendered image.

It also has an element inspector – track down why your CSS isn\’t working quite right and a script debugger, this plugin coupled with IE tab is a must for any web developer. I can’t believe how good it actually is, i wish i had discovered it earlier.

New CAR-PC FrontEnd

Wednesday, January 28th, 2009

*POST BROUGHT OUT OF BACKUPS*

So after quite some time i have finally managed to write my own front-end for my CarPC. The problem with the existing system was that there was no way to alter the playlist. The existing system consisted of an old Compaq laptop in the boot coupled with a MatrixOrbital LCD display (from Kustom PCs) and a Car2PC interface for a Pioneer Headunit (purchased direct from the US at InDashPC but they are now also stocked in the UK by KustomPCs) These two things allowed me to control play/pause/skip etc as well as have a display for the current playing song and date/time.

The problem with this is that i simply had one large playlist set to random and this wasn’t always to everyone’s taste – including my own. The software driving the LCD (LCDC) also had issues when the display was unplugged or not correctly initialised (it’s a USB display which emulates a COM port and things tend to go wrong when COM ports just disappear). Since the laptop is in the boot under a false floor it’s not very easy to get to it if things go wrong (usually requires a crossover cable and VNC from my other laptop)

So this led me to design a new system – a system which would allow someone to browse the music library, adjust winamp controls (such as shuffle) and be resilient against device removal. The hardware will be as before but plus a Griffin PowerMate – a DIY iDrive if you will.

Implementing my idea was trickier than i thought – i ended up writing my own directory navigation system so that all directory names are stepped through on the screen (when the control is turned) and selected on a ‘click’ the traditional ‘dot’ and ‘double dot’ directories are represented to allow selection of current directory as well as navigate ‘up’.

The top level directory contains winamp controls, i didn’t want to write my own media player so i opted for spawning the winamp process from within my application and sending window messages to it for control. Since the winamp SDK is a bit vague on how this is done it required some guesswork on my part.

The controls available are fairly basic but include play/pause, next, previous, shuffle, LCD brightness, LCD contrast, winamp volume.

In order to make the system resilient, all of the code for setting up and tearing down the LCD is contained within their own functions and if an error occurs on communication it repeatedly attempts to restart the connection until it works again – if i unplug the LCD and plug it back in again it merely takes a few seconds for it to spring back into life, the same goes for the PowerMate, although i had help there, i used a component from the JCL/JVCL library called TjvHidDeviceController, this is based on the windows HID API which was specially ported into delphi. My application simply keeps tags on HID events and is notified if the PowerMate is plugged in or out.

In all it works rather well – it is very reliable so far, unfortunatly i don’t have any pictures of the car yet – maybe later and the screenshot of the app isn’t really very interesting, it is however here) It’s mostly just debug information to allow me to test various parts of the application – many of which are no longer valid as everything is setup automatically when the application starts up.

In the future i expect to re-structure much of the app into seperate classes/threads so i can then reuse the code later in other projects, i’d also like to write some more text processing algorithms for on-screen effects (it currently scrolls and centres but i’d like wipes/fades etc between screens).

The software was written in C++ using Borland/Codegear RAD Studio 2007.

PS Pictures of the car now available on my Flickr account here

fonefunshop.co.uk

Wednesday, January 28th, 2009

*POST BROUGHT OUT OF BACKUPS*

Recently i was given a Nokia N95 8Gb, however it was locked to the Three network, after looking around the net i came to the conclusion that nokia have come up with a system that cannot be circumvented – all the unlocking systems ultimately go back to Nokia with ‘credits’ to unlock the phone.

The only place i could find to do this was www.fonefunshop.co.uk and while they require that you post them the phone to their store in sheffield, the service was extremely good. Everything happened exactly as it says on their website – eg they only unlock phones on thursdays so you can’t expect it back before then.

I sent the phone off on monday with some trepidation, it arrived back on friday exactly as they had said – no damage and unlocked exactly as i had described.

Bottom line? They’re a decent company and seem to go out of their way to be open and honest about what they do and how they do it. They even allow you to go to their shop in Sheffield in person if you didn’t want to send it by post.

So we’re coming to the end of another year

Wednesday, January 28th, 2009

*POST BROUGHT OUT OF BACKUPS*

So this is it, we’re fast approaching the end of another year. A year that no doubt will have no worries about leaving behind and moving on, in this current state of economy it’s no wonder. As i sit having dinner i hear the BBC announce that an investor on Wall St has lost over $50bn of investors money. (See http://news.bbc.co.uk/1/hi/business/7783236.stm) The world seems to be collapsing in on itself, well, not physically, not until the boys at Cern get to turn on the LHC (if you believe what you read in the tabloid press that is).

As far as tech goes – it hasn’t i’ve done nothing interesting recently, apart from my new Car-PC interface system – i’m writing software which will allow me to directory browse on the 2-line 20 Character display i have in the car. This coupled with the Griffin Powermate will make for quite a neat little solution meaning i can choose the music in the car, and seeing as how the top level menu is options, even control parameters such as shuffle! That should be interesting to get working – currently i have to do the Powermate interface (already prototyped as part of a uni project) and the serial output thread for the display text – that will be quite challenging as i’ve never done thread safe memory stuff outside of work

I’ll leave it there, i have two more solid days of uni work to do before im free for christmas, then after that i’ve an assignment and two exams due in January which won’t be fun then into the final 12 weeks of my degree – scary stuff!

Where did it go?

Sunday, January 25th, 2009

Once again, 000webshite have deleted my website along with the last backup – so all the posts i made since the last deletion have all gone!

Damn and blast!

So im back once again with a whinge-moan post, no matter, it won’t happen again i’m now with TSOHost as highly recommended by the people at OCUK for £3/month. Hopefully this time it won’t be deleted.

I’ll check the web archive to see if i can get some of the other posts back.