router: annotate source locations of WALKAROUND debug items
This commit is contained in:
parent
8e2fb1bdb9
commit
af2e163890
|
@ -91,6 +91,10 @@ private:
|
|||
if( dbg && dbg->IsDebugEnabled() ) \
|
||||
dbg->method( __VA_ARGS__, PNS::DEBUG_DECORATOR::SRC_LOCATION_INFO( __FILE__, __FUNCTION__, __LINE__ ) );
|
||||
|
||||
#define PNS_DBGN(dbg,method) \
|
||||
if( dbg && dbg->IsDebugEnabled() ) \
|
||||
dbg->method( PNS::DEBUG_DECORATOR::SRC_LOCATION_INFO( __FILE__, __FUNCTION__, __LINE__ ) );
|
||||
|
||||
} // namespace PNS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -65,19 +65,16 @@ WALKAROUND::WALKAROUND_STATUS WALKAROUND::singleStep( LINE& aPath, bool aWinding
|
|||
bool s_cw = aPath.Walkaround( current_obs->m_hull, path_walk,
|
||||
aWindingDirection );
|
||||
|
||||
if ( Dbg() )
|
||||
{
|
||||
Dbg()->BeginGroup("hull/walk");
|
||||
PNS_DBG( Dbg(), BeginGroup, "hull/walk" );
|
||||
char name[128];
|
||||
snprintf(name, sizeof(name), "hull-%s-%d", aWindingDirection ? "cw" : "ccw", m_iteration );
|
||||
Dbg()->AddLine( current_obs->m_hull, RED, 1, name);
|
||||
PNS_DBG( Dbg(), AddLine, current_obs->m_hull, RED, 1, name);
|
||||
snprintf(name, sizeof(name), "path-%s-%d", aWindingDirection ? "cw" : "ccw", m_iteration );
|
||||
Dbg()->AddLine( aPath.CLine(), GREEN, 1, name );
|
||||
PNS_DBG( Dbg(), AddLine, aPath.CLine(), GREEN, 1, name );
|
||||
snprintf(name, sizeof(name), "result-%s-%d", aWindingDirection ? "cw" : "ccw", m_iteration );
|
||||
Dbg()->AddLine( path_walk, BLUE, 10000, name );
|
||||
Dbg()->Message( wxString::Format( "Stat cw %d", !!s_cw ) );
|
||||
Dbg()->EndGroup();
|
||||
}
|
||||
PNS_DBG( Dbg(), AddLine, path_walk, BLUE, 10000, name );
|
||||
PNS_DBG( Dbg(), Message, wxString::Format( "Stat cw %d", !!s_cw ) );
|
||||
PNS_DBGN( Dbg(), EndGroup );
|
||||
|
||||
current_obs = nearestObstacle( LINE( aPath, path_walk ) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue