Project

General

Profile

Revision d140fd71

IDd140fd71ddd19ef38a0124cbbea1165874a5474d
Parent 8a4624e7
Child 479d25d8

Added by Yuyang almost 4 years ago

Added Sensors class that abstracts away sensors from behaviors. Stops creating
duplicated sensors for each scout.

View differences:

scout/libscout/src/behaviors/draw_cw_circle.h
27 27
#define _DRAW_CW_CIRCLE_H_
28 28

  
29 29
#include "../Behavior.h"
30
#include "../Sensors.h"
30 31

  
31 32
class draw_cw_circle : Behavior
32 33
{
33 34
    public:
34 35
        /// @todo Is this the best way to inherit the Behavior constructor?
35
        draw_cw_circle(std::string scoutname) : Behavior(scoutname, "draw_cw_circle") {};
36
        draw_cw_circle(std::string scoutname, Sensors* sensors) : 
37
                Behavior(scoutname, "draw_cw_circle", sensors) {};
36 38

  
37 39
        /** Actually executes the behavior. */
38 40
        void run();

Also available in: Unified diff