From 57d8dca176baf01f950f81272d63d59e2ed95d58 Mon Sep 17 00:00:00 2001 From: jmt Date: Wed, 21 Oct 2009 22:47:29 +0000 Subject: [PATCH] Fix for an uninitialised value, reported by Dave Luff. --- src/Instrumentation/gps.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Instrumentation/gps.cxx b/src/Instrumentation/gps.cxx index 43646cbf0..1ef7dfcd1 100644 --- a/src/Instrumentation/gps.cxx +++ b/src/Instrumentation/gps.cxx @@ -281,6 +281,7 @@ GPS::Config::setExternalCourse(double aCourseDeg) //////////////////////////////////////////////////////////////////////////// GPS::GPS ( SGPropertyNode *node) : + _selectedCourse(0.0), _dataValid(false), _lastPosValid(false), _mode("init"), @@ -559,6 +560,9 @@ GPS::update (double delta_time_sec) if (_dataValid && (_mode == "init")) { // allow a realistic delay in the future, here SG_LOG(SG_INSTR, SG_INFO, "GPS initialisation complete"); + + _selectedCourse = _config.getExternalCourse(); + if (_route_active_node->getBoolValue()) { // GPS init with active route SG_LOG(SG_INSTR, SG_INFO, "GPS init with active route"); -- 2.39.5