Revision 7f095440 scout/scoutsim/src/sim_frame.cpp

View differences:

scout/scoutsim/src/sim_frame.cpp
68 68
        srand(time(NULL));
69 69

  
70 70
        update_timer = new wxTimer(this);
71
        update_timer->Start(SCOUTSIM_REFRESH_RATE * 1000);
71
        update_timer->Start(REAL_TIME_REFRESH_RATE * 1000);
72 72

  
73 73
        Connect(update_timer->GetId(), wxEVT_TIMER,
74 74
                wxTimerEventHandler(SimFrame::onUpdate), NULL, this);
......
316 316
        SetSize(wxSize(path_bitmap.GetWidth(), path_bitmap.GetHeight()));
317 317
    }
318 318

  
319
    // Runs every SCOUTSIM_REFRESH_RATE.
319
    // Runs every REAL_TIME_REFRESH_RATE.
320 320
    void SimFrame::onUpdate(wxTimerEvent& evt)
321 321
    {
322 322
        ros::spinOnce();
......
402 402
        }
403 403
        else if (wxGetKeyState(WXK_LEFT))
404 404
        {
405
            teleop_l_speed = -TELEOP_PRECISE_SPEED * 2;
406
            teleop_r_speed = TELEOP_PRECISE_SPEED * 2;
405
            teleop_l_speed = -TELEOP_PRECISE_SPEED * 4;
406
            teleop_r_speed = TELEOP_PRECISE_SPEED * 4;
407 407
        }
408 408
        else if (wxGetKeyState(WXK_RIGHT))
409 409
        {
410
            teleop_l_speed = TELEOP_PRECISE_SPEED * 2;
411
            teleop_r_speed = -TELEOP_PRECISE_SPEED * 2;
410
            teleop_l_speed = TELEOP_PRECISE_SPEED * 4;
411
            teleop_r_speed = -TELEOP_PRECISE_SPEED * 4;
412 412
        }
413 413
    }
414 414

  
......
437 437

  
438 438
        if (wxGetKeyState(WXK_LEFT))
439 439
        {
440
            teleop_fluid_omega -= TELEOP_FLUID_INC;
440
            teleop_fluid_omega -= TELEOP_FLUID_INC * 2;
441 441
        }
442 442
        else if (wxGetKeyState(WXK_RIGHT))
443 443
        {
444
            teleop_fluid_omega += TELEOP_FLUID_INC;
444
            teleop_fluid_omega += TELEOP_FLUID_INC * 2;
445 445
        }
446 446
        else
447 447
        {
......
522 522

  
523 523
        for (; it != end; ++it)
524 524
        {
525
            it->second->update(SCOUTSIM_REFRESH_RATE,
525
            it->second->update(SIM_TIME_REFRESH_RATE,
526 526
                               path_dc,sonar_dc,sonar_visual_on,
527 527
                               path_image, lines_image, walls_image,
528 528
                               path_dc.GetBackground().GetColour(),
......
532 532

  
533 533
        for (unsigned int i=0; i<ghost_scouts.size(); ++i)
534 534
        {
535
            ghost_scouts.at(i)->update(0.016, path_dc, sonar_dc,
535
            ghost_scouts.at(i)->update(SIM_TIME_REFRESH_RATE, path_dc, sonar_dc,
536 536
                path_dc.GetBackground().GetColour(), state);
537 537
        }
538 538

  

Also available in: Unified diff