Statistics
| Branch: | Tag: | Revision:

amiro-os / devices / PowerManagement / userthread.h @ ba75ee1d

History | View | Annotate | Download (596 Bytes)

1 58fe0e0b Thomas Schöpping
#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 61b0791a Thomas Schöpping
13
  enum State {
14
    IDLE,
15
    OBSTACLE_AVOIDANCE,
16
    WII_STEERING,
17
  };
18
19
public:
20 58fe0e0b Thomas Schöpping
  explicit UserThread();
21
22
  virtual ~UserThread();
23
24
  virtual msg_t main();
25 61b0791a Thomas Schöpping
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 58fe0e0b Thomas Schöpping
};
34
35
} // end of namespace amiro
36
37
#endif // AMIRO_USERTHREAD_H_