Revision 9cb9623b

View differences:

scout/scoutsim/src/scout.cpp
297 297
                // draw a circle at the wall_x, wall_y where reading > 128
298 298
                sonar_dc.SelectObject(*path_bitmap);
299 299
                sonar_dc.SetBrush(*wxRED_BRUSH); //old value
300
                sonar_dc.DrawCircle(wxPoint(old_front_dx,old_front_dy), 2);
300
                sonar_dc.DrawCircle(wxPoint(old_front_dx, old_front_dy), 2);
301 301
                old_front_dx = d_x;
302 302
                old_front_dy = d_y;
303 303
            }
scout/scoutsim/src/scoutsim.cpp
138 138
    EVT_MENU(ID_TELEOP_PRECISE, scoutsim::SimFrame::startTeleopPrecise)
139 139
    EVT_MENU(ID_TELEOP_FLUID, scoutsim::SimFrame::startTeleopFluid)
140 140
    EVT_MENU(ID_SONAR, scoutsim::SimFrame::showSonar)
141
    EVT_MENU(ID_TEST, scoutsim::SimFrame::doTest)
141 142
END_EVENT_TABLE()
142 143

  
143 144
DECLARE_APP(ScoutApp);
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(),
scout/scoutsim/src/sim_frame.h
77 77
#define ID_TELEOP_PRECISE 8
78 78
#define ID_TELEOP_FLUID 9
79 79
#define ID_SONAR 10
80
#define ID_TEST 11
80 81

  
81 82
// Absolute speeds (-128 - 127)
82 83
#define TELEOP_PRECISE_SPEED 62
......
108 109
            void stopTeleop(wxCommandEvent& event);
109 110
            void startTeleopPrecise(wxCommandEvent& event);
110 111
            void startTeleopFluid(wxCommandEvent& event);
111
	    void showSonar(wxCommandEvent& event);
112
            void showSonar(wxCommandEvent& event);
113
            void doTest(wxCommandEvent& event);
112 114

  
113 115
            DECLARE_EVENT_TABLE()
114 116

  
......
174 176
            float width_in_meters;
175 177
            float height_in_meters;
176 178

  
177
	    bool sonar_visual_on;
179
            bool sonar_visual_on;
178 180

  
179 181
            std::string map_base_name;
180 182
            std::string map_lines_name;

Also available in: Unified diff