Statistics
| Branch: | Tag: | Revision:

amiro-os / devices / PowerManagement / userthread.h @ 61b0791a

History | View | Annotate | Download (596 Bytes)

1
#ifndef AMIRO_USERTHREAD_H_
2
#define AMIRO_USERTHREAD_H_
3

    
4
#include <ch.hpp>
5
#include <amiroosconf.h>
6

    
7
namespace amiro {
8

    
9
class UserThread : public chibios_rt::BaseStaticThread<USER_THREAD_STACK_SIZE>
10
{
11
public:
12

    
13
  enum State {
14
    IDLE,
15
    OBSTACLE_AVOIDANCE,
16
    WII_STEERING,
17
  };
18

    
19
public:
20
  explicit UserThread();
21

    
22
  virtual ~UserThread();
23

    
24
  virtual msg_t main();
25

    
26
  void setNextState(const State state);
27

    
28
  State getCurrenState() const;
29

    
30
  msg_t setWiiAddress(const char* address);
31

    
32
  float setWiiDeadzone(const float deadzone);
33
};
34

    
35
} // end of namespace amiro
36

    
37
#endif // AMIRO_USERTHREAD_H_