SlotForum banner
1 - 16 of 16 Posts

·
Registered
Joined
·
150 Posts
Discussion Starter · #1 ·
Having spent a few too many years playing around with computers and writing useless bits of code (and sometimes being paid for doing so), I was always going to end up playing with connecting the APB up to the computer to see how things work.

And for those that don't already know, it works by taking over the APB, so you can do anything you want.

I know that I'd never be able to write anything as good as SSDC - and nor would I want to try to write a rival - why try to re-invent the wheel when it's so good already?

But what if you don't want to race? (what? sacrilege!)

Starting out

I started with a basic practice mode; nothing exciting really, just timed laps and allowed the throttles to be scaled down just as the APB does. It let me get to grips with the way the APB works and get the basics set up. I also managed to get it talking to Pit Pro.

I then started to think about what else could be done...

I have plans to hire my track out for school fairs, fundraisers etc. My plan for these would be to let people try to set the fastest lap; give them 2-3 minutes to do what they can. Ideally I'd like some software to do all the donkey work for me.

And that was the base for my "Short Runs" mode.

The software will maintain a list of drivers. Each driver can be allocated a different class, and each class has a given powerscale. So, there could be a class "Kids" at 40% power; "Teenagers" at 60% and "Adults" at 80%, so the best times can be grouped and there can be a winner for each class.

Each driver can then be set up to drive a given car for a preset amount of time. The software will start counting the time down once the car crosses the start/finish line, then it'll log the lap times, and will allow the driver to finish their last lap before bringing the car to a halt.



Yeah, OK, it doesn't look very exciting. One window for setting the mode up, another for displaying the times. Here's a vid of the windows, going through initial setup, adding a driver, and setting up a race. (It's not riveting viewing, the last half is when the car is being driven so you're just watching numbers on a screen).


There's the slightly more interesting video of the Pit Pro in action during a stint. It goes through a few states:
  • 3 lights flashing - ready to start
  • 3 lights on - started. More than 2/3rds time left
  • 2 lights on - between 1/3rd and 2/3rds time left
  • 1 light on - less than 1/3rd time left
  • 1 light flashing - less than 1/6th time left
  • 1 light flashing faster - time up, finish the current lap

It's only been lightly tested; currently no more than one person at a time but it seems to be working, though it does need a full scale test.

It's not polished either; e.g the time left field on the control window shouldn't be showing so many decimal places... but these are finishing touches in my eyes, I'd rather ensure the thing worked first.

Caveats

This is not release ready. I've no idea what would be needed to release it (I'm still running it out of Visual Studio at the moment). Not that it'd be released in the same way as SSDC; I don't think a lot of people would use it, but I'm happy to consider some sort of limited release for those that would.

Future

After reading about Graham Lane's regularity event I quite like the idea of being able to run something like that. I remember seeing on Top Gear, as part of the classic car rally they took part in, an event where the racers had to set a lap time round a circuit and then repeat that lap time, getting penalty points for being away from their target time. I like those kind of modes - something that takes the emphasis away from having the quickest car...

I've also (briefly) spoken to Graham about a mode to run the MMC rally next year. Cars setting off at a given interval, timing their lap, maybe even tracking the two halts required. No reason why that can't be done - watching the throttle for 5 seconds of 0 input. I like that there's more than a year to the event so I'd have plenty of time to code and test!

Not sure what else, but it's built so that new modes can be added on top of the core code (that handles lap timing, throttles etc), so it should make adding more functionality a bit quicker.
 

·
Registered
Joined
·
97 Posts
Great work. I have a portable track which I use at a variety of kids events. This would be excellent for use in these settings. As I usually have 4 kids on the track at a time, it would be good if your program could a. track each b. keep an ongoing list of times so that after say 20 have been through there they are listed in order according to their times.
 

·
Registered
Joined
·
41 Posts
QUOTE (dJomp @ 5 Jul 2011, 23:51) <{POST_SNAPBACK}>Having spent a few too many years playing around with computers and writing useless bits of code (and sometimes being paid for doing so), I was always going to end up playing with connecting the APB up to the computer to see how things work.

And for those that don't already know, it works by taking over the APB, so you can do anything you want.

Where did you find doco/info on the APB wire format?
 

·
Registered
Joined
·
150 Posts
Discussion Starter · #6 ·
QUOTE (bbqninja @ 6 Jul 2011, 07:23) <{POST_SNAPBACK}>Where did you find doco/info on the APB wire format?

I got in touch with RichG for the APB protocol setup, and the Pit Pro too. Andy helped me with a note about leaving the powerbase in a usable state afterward and dynamic brakes. It's great to have the community to ask for assistance.

I've spent most of my time learning (a) visual programming and (
working with com ports!
 

·
Registered
Joined
·
2,885 Posts
QUOTE (awallace @ 6 Jul 2011, 08:17) <{POST_SNAPBACK}>I've just spoken with Hornby, and have been given permission to make the APB protocol documentation generally available. Expect to see the document on the SSDC web site later today.
Can't see it; could you post a link please - lots of budding programmers out here
 

·
Andrew Wallace
Joined
·
1,100 Posts
I had written confirmation from Hornby yesterday, so was not able to post the document any earlier. I have posted the interface documentation, as well as details about recent amendments onto the SSDC web site. Look on the "Interface" page. For those that are interested, I will keep this page updated as/when the SNC protocol changes with firmware updates.
 

·
Greg Gaub
Joined
·
14,987 Posts
The APB is the term we use for the C7042 Advanced digital Power Base.
I think there is a list of terms and acronyms somewhere. Not sure where, or if it includes "APB" though.
 

·
Prof I T
Joined
·
11,162 Posts
hi
for a list of all the available acronyms check out richardtheforths sig link.
 

·
Registered
Joined
·
150 Posts
Discussion Starter · #16 ·
I need to learn some more basics of software development


I did try the proper build of the software when I last had the track out but there was about a second's lag on the throttles... up until then I'd been running it straight from Visual Studio with no such issues.

So, I need the fundamentals sorted - then I can get back to the more interesting side of things!
 
1 - 16 of 16 Posts
Top