/*
- * Copyright Droids Corporation (2007)
- *
+ * Copyright Droids Corporation (2010)
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
#define I2C_RIGHT_SIDE 1
#define I2C_AUTO_SIDE 2
#define I2C_CENTER_SIDE 3
+#define I2C_NO_SIDE 4
#define I2C_COLOR_YELLOW 0
#define I2C_COLOR_BLUE 1
#define I2C_COB_WHITE 1
#define I2C_COB_UNKNOWN 2
#define I2C_COB_REMOVED 3
+#define I2C_COB_NONE 4
struct i2c_cmd_hdr {
uint8_t cmd;
#define I2C_COBBOARD_MODE_HARVEST 0x01 /* harvest mode */
#define I2C_COBBOARD_MODE_EJECT 0x02 /* eject cobs */
#define I2C_COBBOARD_MODE_INIT 0x03 /* init state machine */
+#define I2C_COBBOARD_MODE_KICKSTAND 0x04 /* help to climb the hill */
uint8_t mode;
};
#define I2C_COBBOARD_SPK_DEPLOY 0x01 /* deploy the spickle */
#define I2C_COBBOARD_SPK_AUTOHARVEST 0x02 /* auto harvest the cobs */
+#define I2C_COBBOARD_SPK_NO_MOVE 0x04 /* if enabled, don't change state */
+#define I2C_COBBOARD_SPK_WEAK 0x08 /* if enabled, current limit */
uint8_t lspickle;
uint8_t rspickle;
};
#define I2C_COBBOARD_STATUS_LBUSY 0x02
#define I2C_COBBOARD_STATUS_RBUSY 0x03
#define I2C_COBBOARD_STATUS_EJECT 0x04
+#define I2C_COBBOARD_STATUS_KICKSTAND 0x05
uint8_t status;
uint8_t cob_count;
uint8_t status;
uint8_t ball_count;
+
+ /* detection of cobs */
+ uint8_t lcob;
+ uint8_t rcob;
};
#endif /* _I2C_PROTOCOL_H_ */