Revision eb9cff77
ID | eb9cff771c06a2ed3f37c591ed4c1ee0a20df76d |
Fixed sonar bug (corrected y direction)
Added sonar_toggle and set_scan command and callbacks
Cleaned up sonar_visual toggle code
scout/scoutsim/src/sim_frame.cpp | ||
---|---|---|
103 | 103 |
wxBitmap lines_bitmap; |
104 | 104 |
wxBitmap walls_bitmap; |
105 | 105 |
path_bitmap.LoadFile(wxString::FromAscii(display_map_name.c_str())); |
106 |
sonar_on = TRUE; |
|
106 |
sonar_visual_on = TRUE;
|
|
107 | 107 |
|
108 | 108 |
// Try to load the file; if it fails, make a new blank file |
109 | 109 |
if (!lines_bitmap.LoadFile(wxString::FromAscii(map_lines_name.c_str()))) |
... | ... | |
272 | 272 |
|
273 | 273 |
void SimFrame::showSonar(wxCommandEvent& WXUNUSED(event)) |
274 | 274 |
{ |
275 |
sonar_on = not sonar_on;
|
|
275 |
sonar_visual_on = not sonar_visual_on;
|
|
276 | 276 |
clear(); |
277 | 277 |
} |
278 | 278 |
|
... | ... | |
489 | 489 |
|
490 | 490 |
for (; it != end; ++it) |
491 | 491 |
{ |
492 |
it->second->update(0.016, path_dc,sonar_dc,sonar_on, |
|
492 |
it->second->update(0.016, path_dc,sonar_dc,sonar_visual_on,
|
|
493 | 493 |
path_image, lines_image, walls_image, |
494 | 494 |
path_dc.GetBackground().GetColour(), |
495 | 495 |
sonar_dc.GetBackground().GetColour(), |
Also available in: Unified diff