Project

General

Profile

Revision d140fd71

IDd140fd71ddd19ef38a0124cbbea1165874a5474d
Parent 8a4624e7
Child 479d25d8

Added by Yuyang over 11 years ago

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

View differences:

scout/libscout/src/behaviors/line_follow.h
27 27
#define _LINE_FOLLOW_H_
28 28

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

  
31 32
#define MOTOR_BASE 50
32 33
#define SCALE 20
......
34 35
class line_follow : public Behavior
35 36
{
36 37
    public:
37
        line_follow(std::string scoutname) : Behavior(scoutname, "line_follow") {};
38
        line_follow(std::string scoutname, Sensors* sensors) : 
39
                Behavior(scoutname, "line_follow", sensors) {};
38 40

  
39 41
        /** Actually executes the behavior. */
40 42
        void run();

Also available in: Unified diff