4,7 → 4,7 |
* Riddim |
* Remote Interactive Digital Drone Interface Mashup |
* |
* 2007-2008 Marcus -LiGi- Bueschleb |
* (cc) 2007-2009 Marcus -LiGi- Bueschleb |
* |
* |
**************************************************/ |
12,8 → 12,6 |
#include "riddim.h" |
|
int state=STATEID_SCANNING; |
|
|
struct js_event x52_event_struct; |
|
int engines_on=0; |
22,10 → 20,23 |
int *axis; |
char *button; |
|
int act_nick=0; |
int act_roll=0; |
int act_gier=0; |
int act_gas=0; |
int act_mode=0; |
|
int act_alt=0; |
long act_long_alt=0; |
|
struct x52 *x52_output; |
|
int selected_bt_device=0; |
|
int count=0; |
int connected=0; |
int input=INPUT_NONE; |
|
void write_display(int line,char* text) |
{ |
if (x52_output) x52_settext(x52_output, line , text, strlen(text)); |
67,14 → 78,7 |
|
|
|
int count=0; |
int connected=0; |
|
|
int input=INPUT_NONE; |
|
|
|
int main(int argc, char**argv) |
{ |
|
83,18 → 87,13 |
printf("\nusage:\n"); |
printf("\t riddim [config_file]\n\n"); |
|
|
|
|
|
// bt_host_init(); |
|
// check if config file as argument |
if (argv[1]) |
parse_config(argv[1]); |
else |
parse_config("/etc/riddim.conf"); |
|
|
bt_host_init(); |
collect_evdev_devices(); |
parse_config_input_sections(); |
// exit(0); |
219,7 → 218,7 |
|
|
// blink_evdev_led(); |
// bt_host_tick(mk_socket); |
bt_host_tick(mk_socket); |
usleep(loop_delay); |
|
poll_evdev(); |
606,8 → 605,9 |
|
gettimeofday(&loop_end_time,NULL); |
last_trip_time=(unsigned long)(loop_end_time.tv_usec-loop_start_time.tv_usec)+(unsigned long)(loop_end_time.tv_sec-loop_start_time.tv_sec)*1000000; |
printf("last trip: %d\n",last_trip_time); |
printf("last trip: %ld\n",last_trip_time); |
|
trip_count++; |
|
} |
|