Revision 945
Integrated new BOM1.5 compatible code. Also put eeprom code for reading ID and BOM type from EEPROM. will need to program each robot's eeprom separately later. This has been tested and verified to work on robots with different BOM types.
dragonfly_lib.h | ||
---|---|---|
54 | 54 |
#define ORB 0x04 |
55 | 55 |
/** @brief Initialize the motors **/ |
56 | 56 |
#define MOTORS 0x08 |
57 |
/** @brief Initialize I2C **/ |
|
58 |
#define I2C 0x20 |
|
57 | 59 |
/** @brief Initialize the buzzer **/ |
58 |
#define BUZZER 0x10
|
|
60 |
#define BUZZER 0x40
|
|
59 | 61 |
/** @brief Initialize the LCD screen **/ |
60 |
#define LCD 0x20 |
|
61 |
/** @brief Initialize everything **/ |
|
62 |
#define ALL_ON 0xFF |
|
62 |
#define LCD 0x80 |
|
63 |
/** @brief Initialize the rangefinders **/ |
|
64 |
#define RANGE 0x0100 |
|
65 |
/** @brief Initialize the BOM **/ |
|
66 |
#define BOM 0x0200 |
|
67 |
/** @brief Initialize everything **/ |
|
68 |
#define ALL_ON 0x03FF |
|
63 | 69 |
|
64 |
|
|
65 | 70 |
/** @brief Initialize the board **/ |
66 | 71 |
void dragonfly_init(int config); |
67 | 72 |
|
... | ... | |
87 | 92 |
#include <bom.h> |
88 | 93 |
#include <move.h> |
89 | 94 |
#include <reset.h> |
95 |
#include <math.h> |
|
96 |
#include <eeprom.h> |
|
90 | 97 |
|
91 | 98 |
#endif |
92 | 99 |
|
Also available in: Unified diff