Discussion Forum > Fix for sample code chapter 5

This should help aart who posted earlier. I only came accross it today while working thru chap 5.

this is for the GPS enabled flashlight. In
GpsEmulatorProgram.cs

find this line
gpsPort = this.FindComponentById("Roomba_Port") as ComPortToMemoryStream;

and replace it with this line
gpsPort = this.FindComponentById("GPS_Port") as ComPortToMemoryStream;

GPS_Port is the name used in the emulator.config file not Roomba_Port

the sample will now work using the log file as a source of GPS messages.

Very cool book, on an interesting product
November 16, 2007 | Unregistered CommenterJon Hanson
Thanks for that. I'm trying to get the code on the book download area fixed, in the meantime you can get an updated version of the GPS code from my blog at:

http://www.robmiles.com/storage/teched-2007/TechEd%20Demos.zip
November 22, 2007 | Registered CommenterRob Miles