Revision 9cb9623b
Working on turning sonar on and off for robots individually.
scout/scoutsim/src/sim_frame.cpp | ||
---|---|---|
88 | 88 |
wxBitmap lines_bitmap; |
89 | 89 |
wxBitmap walls_bitmap; |
90 | 90 |
path_bitmap.LoadFile(wxString::FromAscii(display_map_name.c_str())); |
91 |
sonar_visual_on = TRUE;
|
|
91 |
sonar_visual_on = true;
|
|
92 | 92 |
|
93 | 93 |
// Try to load the file; if it fails, make a new blank file |
94 | 94 |
if (!lines_bitmap.LoadFile(wxString::FromAscii(map_lines_name.c_str()))) |
... | ... | |
149 | 149 |
menuTeleop->Append(ID_TELEOP_PRECISE, _("&Precise")); |
150 | 150 |
menuTeleop->Append(ID_TELEOP_FLUID, _("&Fluid")); |
151 | 151 |
|
152 |
wxMenu *menuTest = new wxMenu; |
|
153 |
menuTest->Append(ID_TEST, _("&Scouts go here")); |
|
154 |
|
|
152 | 155 |
wxMenuBar *menuBar = new wxMenuBar; |
153 | 156 |
menuBar->Append(menuFile, _("&File")); |
154 | 157 |
menuBar->Append(menuSim, _("&Sim")); |
155 | 158 |
menuBar->Append(menuView, _("&View")); |
156 | 159 |
menuBar->Append(menuTeleop, _("&Teleop")); |
160 |
menuBar->Append(menuTest, _("T&est")); |
|
157 | 161 |
|
158 | 162 |
SetMenuBar(menuBar); |
159 | 163 |
|
... | ... | |
279 | 283 |
void SimFrame::showSonar(wxCommandEvent& WXUNUSED(event)) |
280 | 284 |
{ |
281 | 285 |
sonar_visual_on = not sonar_visual_on; |
282 |
clear();
|
|
286 |
clear();
|
|
283 | 287 |
} |
284 | 288 |
|
289 |
void SimFrame::doTest(wxCommandEvent& WXUNUSED(event)) |
|
290 |
{ |
|
291 |
clear(); |
|
292 |
} |
|
285 | 293 |
|
286 | 294 |
void SimFrame::showMap(wxCommandEvent& WXUNUSED(event)) |
287 | 295 |
{ |
... | ... | |
523 | 531 |
for (; it != end; ++it) |
524 | 532 |
{ |
525 | 533 |
it->second->update(SCOUTSIM_REFRESH_RATE, |
526 |
path_dc,sonar_dc,sonar_visual_on, |
|
534 |
path_dc,sonar_dc, sonar_visual_on,
|
|
527 | 535 |
path_image, lines_image, walls_image, |
528 | 536 |
path_dc.GetBackground().GetColour(), |
529 | 537 |
sonar_dc.GetBackground().GetColour(), |
Also available in: Unified diff