Revision 676cbe0e

View differences:

scout/libscout/src/Behavior.cpp
55 55
    name = my_name;
56 56
    keep_running = true;
57 57
    sensors->init(&motors, &buttons, &sonar, &encoders, &linesensor,
58
                        &wl_sender, &wl_receiver);
58
                        &wl_sender, &wl_receiver, &paintboard, &metal_detector);
59 59
    wl_receiver->register_callback(std::bind(&Behavior::default_callback,
60 60
        this, std::placeholders::_1));
61 61

  
scout/libscout/src/Behavior.h
92 92
        LinesensorControl * linesensor;
93 93
        WirelessSender * wl_sender;
94 94
        WirelessReceiver * wl_receiver;
95
        PaintBoardControl * paintboard;
96
        MetalDetectorControl * metal_detector;
95 97

  
96 98
        // Default callback for wireless receiver.
97 99
        void default_callback(std::vector<uint8_t> data);
scout/libscout/src/Sensors.cpp
48 48
    encoders = new EncodersControl(node, scoutname);
49 49
    linesensor = new LinesensorControl(node, scoutname);
50 50
    wl_sender = new WirelessSender(node);
51
    paintboard = new PaintBoardControl(node, scoutname);
52
    metal_detector = new MetalDetectorControl(node, scoutname);
51 53
}
52 54

  
53 55
// b_stuff stand for behavior control class
......
55 57
                  SonarControl ** b_sonar, EncodersControl ** b_encoders,
56 58
                  LinesensorControl ** b_linesensor,
57 59
                  WirelessSender ** b_wl_sender,
58
                  WirelessReceiver ** b_wl_receiver)
60
                  WirelessReceiver ** b_wl_receiver,
61
                  PaintBoardControl ** b_paintboard,
62
                  MetalDetectorControl ** b_metal_detector)
59 63
{
60 64
    //(MotorControl *)(* b_motors) = motors;
61 65
    *b_motors = motors;
......
65 69
    *b_linesensor = linesensor;
66 70
    *b_wl_sender = wl_sender;
67 71
    *b_wl_receiver = new WirelessReceiver(node);
72
    *b_paintboard = paintboard;
73
    *b_metal_detector = metal_detector;
68 74
}
scout/libscout/src/Sensors.h
61 61
                  SonarControl ** b_sonar, EncodersControl ** b_encoders,
62 62
                  LinesensorControl ** b_linesensor,
63 63
                  WirelessSender ** b_wl_sender,
64
                  WirelessReceiver ** b_wl_receiver);
64
                  WirelessReceiver ** b_wl_receiver,
65
                  PaintBoardControl ** b_paintboard,
66
                  MetalDetectorControl ** b_metal_detector);
65 67
        std::string name;
66 68
    private:
67 69
        ros::NodeHandle node;

Also available in: Unified diff