git.droids-corp.org
/
aversive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cobboard: prepare state machine
[aversive.git]
/
projects
/
microb2010
/
mainboard
/
main.c
diff --git
a/projects/microb2010/mainboard/main.c
b/projects/microb2010/mainboard/main.c
index
d69d058
..
d0c9d14
100755
(executable)
--- a/
projects/microb2010/mainboard/main.c
+++ b/
projects/microb2010/mainboard/main.c
@@
-37,7
+37,7
@@
#include <pwm_ng.h>
#include <timer.h>
#include <scheduler.h>
#include <pwm_ng.h>
#include <timer.h>
#include <scheduler.h>
-#include <time.h>
+#include <
clock_
time.h>
#include <adc.h>
#include <pid.h>
#include <adc.h>
#include <pid.h>
@@
-67,10
+67,6
@@
#include "cs.h"
#include "i2c_protocol.h"
#include "cs.h"
#include "i2c_protocol.h"
-#if __AVR_LIBC_VERSION__ == 10602UL
-#error "won't work with this version"
-#endif
-
/* 0 means "programmed"
* ---- with 16 Mhz quartz
* CKSEL 3-0 : 0111
/* 0 means "programmed"
* ---- with 16 Mhz quartz
* CKSEL 3-0 : 0111
@@
-85,8
+81,8
@@
struct genboard gen;
struct mainboard mainboard;
struct genboard gen;
struct mainboard mainboard;
-struct
mechboard mech
board;
-struct
sensorboard sensor
board;
+struct
cobboard cob
board;
+struct
ballboard ball
board;
/***********************/
/***********************/
@@
-172,7
+168,6
@@
int main(void)
memset(&mainboard, 0, sizeof(mainboard));
mainboard.flags = DO_ENCODERS | DO_RS |
DO_POS | DO_POWER | DO_BD;
memset(&mainboard, 0, sizeof(mainboard));
mainboard.flags = DO_ENCODERS | DO_RS |
DO_POS | DO_POWER | DO_BD;
- sensorboard.opponent_x = I2C_OPPONENT_NOT_THERE;
/* UART */
uart_init();
/* UART */
uart_init();
@@
-244,10
+239,6
@@
int main(void)
NULL, 0);
PWM_NG_INIT16(&gen.servo4, 5, C, 10, PWM_NG_MODE_NORMAL,
NULL, 0);
NULL, 0);
PWM_NG_INIT16(&gen.servo4, 5, C, 10, PWM_NG_MODE_NORMAL,
NULL, 0);
- pwm_ng_set(&gen.servo2, 290); /* right */
- pwm_ng_set(&gen.servo3, 400); /* left */
- /* 2 lintels 180, 485 */
- /* 1 lintel 155, 520 */
/* SCHEDULER */
scheduler_init();
/* SCHEDULER */
scheduler_init();