/demos/trunk/chimera/chimera.c |
---|
96,6 → 96,8 |
init_send(); /* Comunication */ |
init_key(); /* Keyboard */ |
init_action_event(100); |
action_stand_up(); |
return 0; |
/demos/trunk/chimera/send.c |
---|
11,6 → 11,7 |
*/ |
#include "chimera.h" |
#include "tracer.h" |
//#define DEBUG_SEND /* Print Sent Values */ |
#define SERIAL_ON /* Send Data using Serial Port */ |
143,9 → 144,9 |
status.cfg[i].pwm = e->pwm; |
//#ifdef DEBUG_SEND |
#ifdef DEBUG_SEND |
printf_xy(3,2,WHITE,"%8d: Update leg %2d angle",(int)kern_gettime(NULL),i); |
//#endif |
#endif |
} |
250,6 → 251,7 |
task_nopreempt(); |
status.cfg[actual_leg].adc_in = servo_get_analog(COM1, actual_leg); |
TRACER_LOGEVENT(FTrace_EVT_ipoint,actual_leg,status.cfg[actual_leg].adc_in); |
task_preempt(); |
sys_gettime(&t); |
/demos/trunk/chimera/chimera.h |
---|
66,6 → 66,7 |
#define EVT_SET_MASK_LEG_ANGLE 0x01 |
#define EVT_STATUS_FREE 0x00 |
#define EVT_STATUS_WAIT 0x01 |
#define EVT_STATUS_EXEC 0x02 |
#define EVT_STATUS_DONE 0x03 |
100,7 → 101,8 |
/* Actions */ |
int init_action_event(int number_of_events); |
int insert_action_event(struct action_event *e); |
int delete_action_event(struct action_event *e); |
int delete_action_event(int event); |
struct action_event * get_first_old_event(struct timespec *time); |