Revision d7c3c222
Encoders node now actually reads from hardware
This compiles but hasn't been tested on the Scout yet.
scout/encoders/src/encoders.h | ||
---|---|---|
29 | 29 |
* |
30 | 30 |
* @author Colony Project, CMU Robotics Club |
31 | 31 |
* @author Alex Zirbel |
32 |
* @author Tom Mullins |
|
32 | 33 |
**/ |
33 | 34 |
|
34 | 35 |
#ifndef _ENCODERS_H_ |
35 | 36 |
#define _ENCODERS_H_ |
36 | 37 |
|
38 |
#include <fstream> |
|
37 | 39 |
#include "encoders/query_encoders.h" |
38 | 40 |
|
41 |
class Encoder |
|
42 |
{ |
|
43 |
public: |
|
44 |
Encoder(int n); |
|
45 |
int get_ticks(); |
|
46 |
private: |
|
47 |
std::fstream fticks; /**< The file in sysfs containing tick count */ |
|
48 |
}; |
|
49 |
|
|
39 | 50 |
/** @brief Initialize the encoders module and driver **/ |
40 | 51 |
int main(int argc, char **argv); |
41 | 52 |
|
Also available in: Unified diff