conedogers

An auto crosser's journey


1 Comment

NPAPI plugin installation on Windows


This post is about how to take the npruntime code sample that I have blogged about and install it as a chrome extension.

In this series of articles I have provided the code to build a simple NPAPI plugin.  The next steps are to register the plugin with Firefox and Google chrome so we can test the code.

Firefox install

To install a plugin on Firefox under windows you need to use the registry.  That is the most reliable method to install the plugin.

The registry keys used to install the plugin are located in the HKey Local Machine (HKLM) registry hive, so administrative permissions will be required to install the plugin.


Windows Registry Editor Version 5.00

; for 32 bit installations

[HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins\@conedogers.wordpress.com/npruntime,version=1.0.0.3]
"Path"="npruntime.dll"
"ProductName"="npruntime"
"Vendor"="conedogers.wordpress.com"
"Version"="1.0.0.3"

; for 64 bit OS installation

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MozillaPlugins\@conedogers.wordpress.com/npruntime,version=1.0.0.3]
"Path"="npruntime.dll"
"ProductName"="npruntime"
"Vendor"="conedogers.wordpress.com"
"Version"="1.0.0.3"

The path should be the absolute path to the npruntime dll.

Google Chrome installation

Installation on chrome is almost as easy.  Google has added a few steps to package the NPAPI control as an extension.  This extension can either display the plugin publicly, which could expose the client browser to security threats, or you can make the plugin private which only allows your script to access the plugin.

To begin, we need to create a manifest file manifest.json in a sub-folder that is named for the extension.  For this sample, there is a sub-folder installers\Chrome.  Inside this sub-folder we have a folder named npruntime.  Inside this folder we place all the files needed for the chrome extension.

  • icon.png
  • manifest.json
  • npruntime.dll

The manifest.json file should look like this:


{
"name":"npruntime",
"version":"1.0.0.3 ",
"manifest_version":2,
"description":"Mozilla npRuntime sample",
"browser_action":{
"default_icon":"icon.png"
 },
 "plugins": [
{ "path":"npruntime.dll", "public" : true}
]
}

package the plugin

The first step of installing the chrome extension is to create the CRX package.  To do this you need to navigate to the Chrome://extensions page and select the developer mode by selecting the checkbox in the upper right hand corner.  Once you have enabled developer mode, select the pack extension button.

chrome pack extension

Select the folder where the we have the nanifest.json file.

chrome pack select folder

For this sample, navigate to the sub-folder npruntime inside installers\chrome.

chrome pack ready

Now we package the control and create a crx package that we can use to deploy to chrome. The second parameter is a path to your private key file used to provide a certified package. For this sample, leave it blank

chrome pack response

chrome pack success

When we succeed with the packaging, we will have the npruntime.crx and npruntime.pem file. DO NOT lose the pem file! this is a key assigned by chrome that is a key assigned to the control.

Retrieving the Extension ID

Now that you have the packaged extension you need to retrieve the extension ID.  To do this, you open the Chrome://extensions page and in the developer section select the “Load unpacked extension…” button.  You will be prompted to select the control to load, so navigate to the installers\chrome folder and select the npruntime folder to load it into chrome.

After you load the unpacked extension, you will see a screen similar to this.  Highlighted is the extension ID assigned to this control.

After you load the unpacked extension, you will see a screen similar to this. Highlighted is the extension ID assigned to this control.

Now that you have the extension ID, you can complete the registration of the packaged NPAPI control by adding a pair of registry keys to the windows registry.


Windows Registry Editor Version 5.00

; 32 bit operating systems.

[HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\Extensions\ooaihagiflmbfpeiggpknanhplcngmld]
"Path"="C:\\dev\\mozilla\\npruntime\\installers\\chrome\\npruntime\\npruntime.dll"
"Version"="1.0.0.3"

; 64 bit operating systems

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Google\Chrome\Extensions\ooaihagiflmbfpeiggpknanhplcngmld]
"Path"="C:\\dev\\mozilla\\npruntime\\installers\\chrome\\npruntime\\npruntime.dll"
"Version"="1.0.0.3"

And that should do it.  You should be able to view the chrome NPAPI extension in the test.html file provided with the sample.

Source code for this project is available on github: https://github.com/chrisDwarner/npruntimeSampleCode


1 Comment

Visual Studio project settings for NPAPI projects


In one of my previous posts “Visual Studio project settings for NPAPI projects” I posted about how to configure a Visual studio project to build the NPAPI npruntime sample.

I recently had to refer to that project for a new piece of work that I am researching.  the problem is the code sample uploaded to github was the original sample, and if you have downloaded it, the project won’t build without some work.

The project on github.com has been updated to contain a building project.

  • Fixed the Visual studio project settings
  • Fixed the obsolete datatypes.
  • Fixed the obsolete headers.

The source code on github has been updated with the latest changes.

https://github.com/chrisDwarner/npruntimeSampleCode


1 Comment

How To: change your gear set on a hewland LD 200


This is a quick guide that I learned from Neil Porter owner of Porter racing http://www.porterracing.com

The formula ford that I own has a Hewland LD 200 gearbox. This is a fairly common gearbox used in many makes and models of formula ford race cars over the years. Changing the gear ratio’s is a fairly easy task. Based upon the lack of any decent HowTo articles I have found on the internet (read:zero) I thought I would put one together based upon the instruction I received from Porter Racing. It seems like everyone who is familiar with these cars takes this task for granted. If you race a lot, you will be doing this between each race if your next event is at a different track. With autocrossing I only expect to be changing gears until I find the ratios that suite my driving style. Once I get that perfect set, I’ll just put this task aside until I start doing track days and put the car on the track where it belongs.

Tools:

  • 10mm wrench & socket 1/8″ drive
  • 11mm wrench & socket 1/8″ drive
  • 13mm wrench & socket 1/8″ drive
  • <socket for pinion nuts> 1-1/4″ socket or wrench
  • pliers
  • oil pan
  • allen wrench for gear linkage (SAE or metric depending on car/model)
  • gloves

optional (but recommended)

  • gear change pan – I bought one of these gear change pans from Pegasus (link) and I find the tray useful, but not that helpful.
  • dummy shaft – the most important tool to make the job painless. This tools lets you slide the gears onto the pinion shaft easily with few issues to worry about.

Steps

Get the car raised onto a secure work platform, anywhere it won’t be moved. I recently found a used brenner lift and stand off of Apexspeed.com and that was a very good purchase. It has really made working on the car easy compared to my old setup, working on the short stands with a low profile jack.

Install notes:

  • The gear case is a zero tolerance piece. this means no gasket material should be required. Remove any that you find before re-installing. When you inspect the bearing carrier and end cover inspect the mating surfaces of the pieces for damage. On the photos you can view a white/black stripe on the mating surfaces. This is a Teflon gasket, similar to plumbers tape. this should be the only seal the case needs to keep the fluids in. If you develop leaks, then you should try to replace the Teflon gasket first before attempting to use silicon. If you use silicon, apply a very small amount, only the minimum needed to seal the case. DO NOT use RTV gasket material. Not even a little bit. This will adhere to the teflon gasket and lift it from the gear case. New gaskets are readily available from Taylor-race, but unless you have spares, this can be a hassle to deal with at the last minute. The Hewland Part # VG2019 and you can find it online for around $3
  • If you do not have a dummy shaft, I pity you. When installing and removing the bearing carrier, you will need to cradle the upper gear set, with one hand while removing the bearing carrier with the other. It’s so much easier with the dummy shaft. You also need to be careful with the bearing for the pinion shaft in this case. It has the tendency to twist and can cause problems when installing the gear set.
  • Do not reuse the cotter pins on the nuts. Always use new cotter pins. The layshaft and pinion nuts are supposed to be torqued to 115lbs. Here is a tip. Once you get the holes lined up when the nut is tight, it will be almost exactly 115lbs of torque.


Leave a comment

Race car winter maintenance


So, here we are in January in the middle of my winter refresh and maintenance.  This project is taking a bit longer than anticipated.  But I guess that is to be expected from a 21 year old race car.

At the end of last season, I managed to break a wheel stud.  While fixing the wheel stud, I discovered that I had different length wheel studs on each corner of the car.  I fixed the broken stud so I could continue racing and decided that it would be a good idea to change out the wheel bearings over the winter break, and while I had the chance, change all the wheel studs so I could safely run my panasport rims.  My swift is one of the european build models.  Over In the UK, the Formula Ford race cars are restricted to steel wheels, so they don’t need the longer wheel studs needed to mount the panasport rims.  The US formula Ford series (Formula F, technically) does not have the same wheel requirements.

I am glad I did it, the wheel bearings were toasted.  On my car the rear wheel bearings are the cartridge type, and after pressing the wheel hub out, the grease inside the bearing was exposed.  It was a brownish dust that occupied the spaces between the ball bearings so yeah, time to change the bearings.

Wheel bearings:

Front - The front bearings are off a 80-84 VW Golf, and I very positive that these bearings are the same for all Swift DB1-DB3 models since I share the same front spindle design.

Rear – The rear bearings for this car are from a 90-91 Jetta 16v front wheel bearing.

This is what I expected since the rest of the driveline (axles & CV joints) are all VW sourced parts as well.  I don’t know what the outer CV joint is on the car yet, but I suspect that is would be off the VW Jetta since the CV boots were sourced from the same car.  This would be very cool if this were the case because that CV joint is used on the VW Jetta, Audi TT, later models of the Golf, Vw Passat and other  models.

At this point I need to put together a nut&bolt kit for the car.  I need to reach out to some contacts that I was given from the seller for some companies in the UK that still support the car.  Hopefully they have more information on the parts I need.  I still have to order my new set of race tires for next season too.  It’s coming together, hopefully I can put on a decent effort for this upcoming season.


4 Comments

turkish get ups


This routine is one of my favorites when I am working out.  In the past I have always used a dumbbell  because it was easier to perform the exercise.  This routine is supposed to be done with a barbell, but that requires a lot of arm and shoulder strength to maintain the balance of the bar.  Recently I replaced the dumbbell with the barbell and yeah, it’s much harder.

My prescription weight is 45-65lbs for this routine.  I start out working with a 38lbs barbell for a warmup and then for the workout, I did 2 reps on each side for 3 rounds.

To complete the turkish get up, performs these steps in reverse order and that is one rep.


Leave a comment

Tune2Win | Advanced Tech Articles | ARC Downforce Meter


Tune2Win | Advanced Tech Articles | ARC Downforce Meter.

This tool looks interesting.  It is a sensor that measures your aero downforce in newtons.  I wish I knew of this when I had the Evo.  That car had wings, and it would have been interesting to measure the factory wing to see what kind of downforce I was getting at highway speeds.

I don’t know much about this device, so head on over to Tune2Win for details on how to use this cool datalogging tool.

ARC Downforce Meter

Repairs update

| 1 Comment


I have the car back running after getting some repairs done at Porter Racing out in Merced Ca.  I have to give my thanks to Neil Porter, his work was excellent and the car is performing very well.

IMG_0793The repairs were a bit more involved than I was prepared for.  The side plate had cracked because the whole transmission was flexing in its mounts.  The handling of the must have been diabolical.  When the transmission flexed, it would cause more than a little camber, toe and castor changes in the rear suspension.  The flexing was caused by using the incorrect threaded bolts on the top mounts of the transmission as it bolts to the bell housing.  The bolts used in the repair were metric, and the bolt holes on the transmission were SAE thread.  As it happens, on this particular car, most of the transmission bolts are metric, while the rest of the chassis is SAE.

The fixes were fairly extensive.  The transmission needed to be re-aligned with the input shaft or I would run the risk of blowing the clutch slave seals.  To get the transmission in the right spot, the old damaged lugs were drilled out and inserts were pressed in and shims were machined to take up all the extra space between the bell housing and transmission.  By design this is supposed to be a zero tolerance fit, so it has to be precise.

Along with that, the floor had been damaged as the car had been dragged onto a trailer or flat-bed.  Half of the rivets holding the floor on the frame were stripped off.  Other than that, all the other damaged had been fixed correctly by the previous owner.

Porter Racing put a proper alignment on the car and set the ride height and corner weights.  All of this is on a set of shocks that might be the originals.  Neil put the rears on his shock dyno and the results were in his words “reasonable”, but I have no idea what the spring rates are.

The car is a blast to drive!  I was expecting problems with learning how to shift with the new transmission, but it’s actually really easy.  There is one more event left in the season, hopefully it won’t rain.  Then I need to get the car ready for next season.

This gallery contains 20 photos

Follow

Get every new post delivered to your Inbox.

Join 139 other followers