Tuesday, June 12, 2007

Lancaster Students Web Site

I have a new web site set up that I've done in my spare time. It is aimed at students in Lancaster and will hopefully soon contain a lot more content than it does at the moment on pubs, clubs, and eveyrthing else related to students :) The site can be found at http://www.lancs-students.co.uk. There is also a forum on the site for students to chat about coursework, the societies, night life etc.

Wednesday, May 16, 2007

Jakeman Motorsport

So I've done a bit of work on Jakeman Motorsport recently, it's getting there now I think. There's a few more pics. All the results are now up and we're working on blurbs for the rallies as well. Working on some info on the team and the cars now but it's starting to look a bit better...

Monday, April 30, 2007

The rally car is ready to go... finally

So after deciding to change the gearbox last weekend to put the new, fancy one in (close ratio, 4.8 crownwheel and pinion and a limited slip diff) which went fine. We decided to change the pads and put a new set of mintex on. Nice and simple... right? No, the pads went in fine on one side but on the other we couldn't fit the pads into the caliper.

After much deliberating and measuring to try and diagnose the problem we finally noticed that the hub on the side the pads had gone into had the wrong offset on it. Both sides had 1.9 discs on which have a different offset to the 1.6. The disc offset was screwing up the side that had the proper 1.6 hub on it.

We managed to get hold of another hub in the week and after spending Saturday making some tools to let us change the bearings easier we got it fitted on Sunday. We can now change the bearings a lot easier which is handy so a productive weekend all in all.

Took the pug otu for a test drive after we had put it all back together and the new gearbox seems lots better, should give us a lot better traction due to the LSD and also quite a bit better acceleration. Brint it on.....

Labels:

Thursday, April 19, 2007

Ways to tell you're getting older

Here's the first in my set of quotes I seem to come up with every now and then about getting older :)

1.
You're definately getting older if you are driving home from work, see a garden center and think to yourself 'ooo, a garden centre, I'll stop and have a look round'..

How sad am I now...

More to come no doubt

Wednesday, April 11, 2007

Buffer Overflow

Ok, a nice little post to remind myself not to be such a tard.

char *toPm = (char *)malloc(strlen(cd.nick) + strlen(message) + 6) ;

Looks fine, is fine, toPm was for the folliwing operation :

sprintf(toPm, "%s : %s\r\n", cd.nick, message) ;

Now I counted up, checked everything counted again and came to 6 extras both times, space before the ':', the ':' itself, a space after, the \r, the \n and null. everything seems fine. No, getting segfualts every now and then. Quite annoying, gdb to the rescue, getting errors in adding text to a wxTextCtrl. Still can't fidn the problem. More digging ensued. Finally realised that there were two spaces before the damn ':'. That would screw it up. Changed to +7 in the malloc and all seems well. One moral to this story really.

USE SNPRINTF().........................

Should have learnt years ago, nm onwards and upwards.....

Tuesday, March 20, 2007

Linux Kernel on Gumstix and i386

Had a few problems getting the Gumstix kernel to compile on an i386 based machine. I imported the entire Gumstix kernel tree into a subversion repository first then checked it out on my laptop. Then I removed the .config file from the subversion repository as this would obviously be set up for an ARM architecture, and replaced it with another .config from a Linux 2.6.20 kernel I had previously compiled on that machine. I thought this would be enough to compile the gumstix kernel on i386 as it changed the processor types etc, but alas it didn't work.

I got a load of errors when running make on the new kernel config such as :

include/asm/system.h:189:5: warning: "__LINUS_ARM_ARCH__" is not defined
include/asm/glue.h:110:2: error: #error Unknown data abort handler type


Obviously a problem with it trying to compile some of the arm asm stuff when I was trying to compile for i386. After a bit of digging I found that include/asm was a symlink to asm-arm so I have deleted this symlink from the svn repository and replaced it locally with a symlink to arm-i386. The kernel is currently compiling so hopefully this has done the trick, time will tel.....

Monday, March 19, 2007

Byte Order

For a while now I've been running some code I wrote in the FreeBSD kernel that has been returning stupid values for the sizes of packets when I print out the payload length field from the ip6_hdr struct as any ipv6 packet leaves the system. Every time I was getting stupid values such as 4096 for a 16 Byte payload, I had a quick think about it at the time and couldn't figure it out. Of course, it is ridiculously stupid now I've thought about it again, and also ridiculously obvious.

NETWORK BYTE ORDER AND HOST BYTE ORDER ARE DIFFERENT.

Hopefully putting this post on here should stop me making the same stupidly obvious mistake in the future, the ntohs() and htons() functions are there for a damn good reason, use them, I am now getting the correct output values on the original FreeBSD code and on my new Linux code. F'ing idiot.....