I’ve figured it out.

Sunday, 29. November 2009

Yup, this morning I was lying in bed and I figured it out! ‘What?’ I hear you ask.. Well I have figured out the link to obesity in the UK and possibly across the world. If computer games can spawn killers then The Very Hungry Caterpillar has to be blamed for people eating too much. A quote from Wikipedia:

“It follows a caterpillar as it munches its way through a variety of edibles such as ice cream, salami, watermelon, one slice of Swiss cheese, and a lollipop before it finally pupates and emerges as a beautiful butterfly.”

I reckon as kids all us folk who are now fat have been psychologically damaged by this book its the only book that says eating 1 fruit and 4 unhealthy items will turn you into a beautiful butterfly. Forget banning GTA or Call of Duty ban that bloody book!!!!

That is all really.

Open Apathy Update

Saturday, 22. August 2009

I thought I better give an update on the work I’ve been doing on Apathy.

I have been working on various GUI  and back-end elements. We decided to remove the Call and Send message icons from the toolbar and instead when a contact is selected on the list a menu will appear, when you do this, Telepathy will query what options the contact supports such as at the moment voice and text chat.  This works well as it clears up the toolbar for contacts and other non contact specific pages and it means as more functionality comes along it won’t further clog up that toolbar and we can hide/show the options available to the users of different protocols. Speaking of protocols, MSN is now supported which is great!

Also, Michael Sheldon (http://blog.mikeasoft.com/) has got Apathy working on the OpenMoko freerunner mobile phone there is a photo below.

Anyway, enough talking and more screen shots:

and a video it is alittle outdated but it still gives the general idea:

apathy

Open Apathy – mobile communications client

Thursday, 11. June 2009

Since finishing my University degree, I have alot of free time on my hands. With this free time I have decided to get involved in some open source software, in this case OpenApathy. Apathy is a mobile communications client which uses the telepathy framework to communicate. It is designed to be used for the OpenMoko software platform but can be run on the desktop and hopefully once more mature be modified for use on other mobile platforms.

I got into the project by creating an add accounts (1) (2) window which you simply select which protocol you wish to use and your usename and password details click Save Settings and away you go!

After that Mike Sheldon and I decided to change the layout of the GUI to slide between pages it looks very nice! Shame I can’t take a screenshot of that happening though. Finally we decided to put the current open conversations on the toolbar (1) (2). Apathy seems to be maturing nicely and it is great to be part of the project and the Enlightenment window manager library is very nice.

Here is a screenshot of the application:

3D viewing

Tuesday, 27. January 2009

With all this buzz about 3D Stereoscopy in tv viewing and games I was having a smurf around the Internet about it and I have found out something really interesting that I never knew before. You can make almost any picture 3D. All you need is two images side by side and to cross your eyes! When you cross your eyes you have to make sure that the images line up on top of each other and your eyes *should* naturally focus.

Here are some example for you to try:

Aberystwyth:

http://www.amacleod.me.uk/stereo.jpg

Inside a 3D game (very basic)

http://www.amacleod.me.uk/ingame.png

and of course Half Life 2

http://www.amacleod.me.uk/hl2.png

it hurts my eyes after a while and no doubt I ain’t doing my eyes any good, but the effect is pretty amazing.

I also bashed together a simple C# application running two videos side by side and it works too!! you have to make sure you have them running at exactly the same time or you get jumping and a ghosting effect.

The best way to do this is to get GraphEdit (search google) download it and run graphedt.exe.  Goto File, Render Media File, select the video you want and do it again. Play the video and align them side by side and cross your eyes. You should get the same effect and it looks awesome!

Have fun!

Alasdair

Treo 500 problems

Sunday, 28. December 2008

I have been getting complaints that I am sending messages twice to people, I am using a Treo 500 with Windows Mobile 6. This is a pain as I am being charged twice for these messages!!!

It turns out if I close the message application before the message is sent, it will send it twice this seems a little broken! I think they might of tried to fix the problem but it has only been made worse.

I have fixed the problem temporarly by restarting the mobile and waiting for the message application to send the message before closing it. Stupid and you would of though someone would of tested this before!

ah well!

Hopefully this should fix the problem

Webbook woes!

Monday, 27. October 2008

Good morning,

I have been getting irritated with my webbook recently everytime I seem to update ubuntu (even a small update) my via drivers seem to go missing so I no longer get the nice compiz’ness and I have to run sudo ./vinstall again…

More recently everytime I restart the via drivers seem to leave me never to return, so I decided to look at the ./vinstall script that comes with the installer now I am no linux expert but it seems that the script doesn’t do “modprobe” on the via.ko and via-agp.ko drivers that get depmod’d so I added:

cp -f ./bin/via.ko $DRMDRIVERDIR/
cp -f ./bin/via-agp.ko $AGPDRIVERDIR/
depmod -ae
modprobe via
modprobe via-agp
echo -n “…”

Now as I said I aint no expert in Linux but I believe that depmod creates a makefile which modprobe then uses to load the drivers into the kernel.

Anyway I added these two lines and run “sudo ./vinstall” again and when I restarted the via drivers started! :)

Now the problem is my system is upto date! So I can’t update to test to see if the via drivers go missing again!

I will keep the search spiders updated about my woes :)

Cheers,

Alasdair

New Theme, and an update!!

Sunday, 19. October 2008

I thought I better get this thing going again, after all I have paid for the URL at least!

I have brought back to life a Packard Bell iMedia PC I installed Gentoo on it this is the first time I have actually used Gentoo linux I usually go for distros based on Debian.

I have to say I prefer Debian, my reasons being is the system I have is an old PC and compiling the system even from Stage 3 took a whole day and then having to emerge everything is a pain. I am sure that it has all the optimisations etc for my system thus making it run as fast as possible but it takes an age to compile even simple things.

The worst annoying thing aswell is the PC interferes with the TV reception, unfortunatly it seems the outside ariel is broken so I have to use an indoor one and having the PC on causes interference. So I have to limit my hacking around with it to times when Emma is working or in bed.

My main goal was to setup mythtv with a simple window manager giving me a nice DVR system to record freeview channels, but I am assuming I won’t get a fantastic reception if its interfering with my TV.

Alas, I am going to watch stephen fry’s journey around america so until next time!

Have fun!

Ali

Stream Driver

Thursday, 22. May 2008

http://msdn.microsoft.com/en-us/library/aa910486.aspx

Recently under Windows CE I have been learning to implement a Stream Driver.

Basically this is a driver that you can call through the CreateFile, ReadFile, WriteFile functions.

Stream Driver is basically a DLL with 12 Functions that you expose:

http://msdn.microsoft.com/en-us/library/aa930506.aspx

Its pretty cool, I am making an example driver that writes to GPIO pins on a device, and yet another thing I can put in the old experience box :)

Boar Media Player

Friday, 16. May 2008

I am in the middle of designing my Boar Media Player. I have an old PC connected upto my TV and I did have Ubuntu linux with MythTV installed on it problem was it seemed to have a personality of its own. It would never EVER use the same drive for playing DVDs and I tried todo other things with the system like play around with the Parallel port so I removed MythTV from automatically starting up this seemed to kill ratpoison the window manager I had on the system.

After hours of fiddling about with the system I decided to install WinXP and develop a media player for it that worked my way and my way only.

At the moment I am in the middle of thinking about the layout and how I would like it to appear so hopefully it will start taking shape soon.

I have bugged Mike (My webserver admin) to install SVN and Trac onto the server so I can upload the source for people to build and also keep track of what needs doing.

So hopefully in the next coming weeks I will have a tracking system etc so I can run it like a professional project

Watching a directory for changes.

Friday, 16. May 2008

As part of the project I am doing at the moment, we want to automatically test to ensure that the update works and can handle errors. This involves automatically uploading a test image to the board and running it overnight.

The problem we needed to overcome was how do we stop the device from running the update as soon as part of the file has been put on thus failing the update.

I delved into the wonders of the Win32 API. The good thing about Window CE6 is that most of the functionality that is available on Windows XP etc is available on Windows Embedded.

I found “FindFirstChangeNotification(LPCTSTR lpPathName, BOOL bWatchSubtree, DWORD dwNotifyFilter).”

FindFirstChangeNotification can watch for a number of different events all listed here:

http://msdn.microsoft.com/en-us/library/aa364417(VS.85).aspx

There is no magic “Notify when file handle is closed” which would of been excellent. So I had to hack a little solution to my problems.

This is my simple hacky solution:



HANDLE hChange;
DWORD dwWaitStatus;

//Setup to fire when the file has been written too
hChange = FindFirstChangeNotification("\\NAND", FALSE, FILE_NOTIFY_CHANGE_LAST_WRITE);

//Wait for the first chunk of data to be written
WaitForSingleObject(hChange, INFINITE);

//Loop around until we can be sure that there is no more data being written to the device
do
{
FindNextChangeNotification(hChange);

//Set timeout for a minute so we can be sure there is no more data being
//Written to the device
dwWaitStatus = WaitForSingleObject(hChange, ONE_MINUTE);

}while(dwStatus == WAIT_OBJECT_0);

/*
.... Rest of update code here ....
*/

FindCloseChangeNotification(hChange);

I thought this would be a good bit of information to have incase I ever have to watch a directory for changes again, especially if the file is being transferred over some medium and we need to know some indication that the transfer is over.

Of course this doesn’t check for completeness since the connection could drop out but that would require alot more effort than we have to create.

Cheers,

Alasdair