diff --git a/RP_L4/RPL4GAUG.cpp b/RP_L4/RPL4GAUG.cpp index 65e5ad3..50dc811 100644 --- a/RP_L4/RPL4GAUG.cpp +++ b/RP_L4/RPL4GAUG.cpp @@ -1648,17 +1648,17 @@ void Test_Tell("z= " << zMin << "..." << zMax << "\n"); // - // RP412CAMLOG. Once, not per sweep - this runs at the gauge rate and - // would drown the log. Says whether the nav display has a sane centre - // and scale at all, which is the first question when the map comes up - // empty on a camera station. + // RP412CAMLOG, on a clock rather than every sweep - this runs at the + // gauge rate and would drown the log. Says whether the nav display has + // a sane centre and scale, and repeats so the centre can be seen + // tracking (or not tracking) as the camera moves. // if (RPCameraLog()) { - static int said = 0; - if (!said) + static Scalar next_bounds_say = 0.0f; + if ((Scalar) Now() >= next_bounds_say) { - said = 1; + next_bounds_say = ((Scalar) Now()) + 5.0f; DEBUG_STREAM << "CamLog: nav scale " << currentScale << "m across, " << pixelsPerMeter << " px/m, centre " << viewing_position.x << "," << viewing_position.z @@ -1703,12 +1703,20 @@ void // drawing steps are not being reached. Reported for the first few // sweeps only - the lists are rebuilt at the gauge rate. // + // + // Sampled on a clock, NOT for the first N sweeps. The first sweeps run + // while the mission is still coming up and nothing has registered + // with the renderer yet, so they report zero on a station whose map + // then works perfectly - which is exactly the false reading this trace + // gave the first time it was written. + // if (RPCameraLog()) { - static int sweeps = 0; - if (sweeps < 5) + static Scalar next_nav_say = 0.0f; + if ((Scalar) Now() >= next_nav_say) { - ++sweeps; + next_nav_say = ((Scalar) Now()) + 5.0f; + ChainIteratorOf statics(staticEntityList.GetInstanceList()); ChainIteratorOf movers(movingEntityList.GetInstanceList()); DEBUG_STREAM << "CamLog: nav in bounds - " << statics.GetSize()