Subversion Repositories Projects

Rev

Rev 505 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 505 Rev 522
Line 2... Line 2...
2
 *
2
 *
3
 *
3
 *
4
 * Riddim
4
 * Riddim
5
 * Remote Interactive Digital Drone Interface Mashup
5
 * Remote Interactive Digital Drone Interface Mashup
6
 *
6
 *
7
 * 2007-2008 Marcus -LiGi- Bueschleb
7
 * (cc) 2007-2009 Marcus -LiGi- Bueschleb
8
 *
8
 *
9
 *
9
 *
10
 **************************************************/
10
 **************************************************/
Line 11... Line 11...
11
 
11
 
Line 12... Line 12...
12
#include "riddim.h"
12
#include "riddim.h"
13
 
-
 
14
int state=STATEID_SCANNING;
-
 
15
 
13
 
Line 16... Line 14...
16
 
14
int state=STATEID_SCANNING;
17
struct js_event x52_event_struct;
15
struct js_event x52_event_struct;
Line 18... Line 16...
18
 
16
 
19
int engines_on=0;
17
int engines_on=0;
Line -... Line 18...
-
 
18
int old_engines_on=0;
-
 
19
 
-
 
20
int *axis;
-
 
21
char *button;
-
 
22
 
-
 
23
int act_nick=0;
-
 
24
int act_roll=0;
-
 
25
int act_gier=0;
-
 
26
int act_gas=0;
20
int old_engines_on=0;
27
int act_mode=0;
Line 21... Line 28...
21
 
28
 
Line -... Line 29...
-
 
29
int act_alt=0;
-
 
30
long act_long_alt=0;
-
 
31
 
-
 
32
struct x52 *x52_output;
22
int *axis;
33
 
23
char *button;
34
int selected_bt_device=0;
24
 
35
 
25
struct x52 *x52_output;
36
int count=0;
Line 65... Line 76...
65
    printf("device%i->%s\n",i,names[i]);
76
    printf("device%i->%s\n",i,names[i]);
66
}
77
}
Line 67... Line -...
67
 
-
 
68
 
-
 
69
 
-
 
70
int count=0;
-
 
71
int connected=0;
-
 
72
 
-
 
73
 
-
 
Line 74... Line 78...
74
int input=INPUT_NONE;
78
 
75
 
79
 
Line 76... Line 80...
76
 
80
 
77
 
81
 
78
int main(int argc, char**argv)
82
int main(int argc, char**argv)
79
{
83
{
Line 80... Line -...
80
 
-
 
81
  printf("Starting Riddim %d.%d \n",RIDDIM_VERSION_MAJOR,RIDDIM_VERSION_MINOR );
-
 
82
  printf("\tRemote Interactive Digital Drone Interface Mashup\n");
-
 
83
  printf("\nusage:\n");
-
 
84
  printf("\t riddim [config_file]\n\n");
84
 
85
 
-
 
86
 
85
  printf("Starting Riddim %d.%d \n",RIDDIM_VERSION_MAJOR,RIDDIM_VERSION_MINOR );
87
 
86
  printf("\tRemote Interactive Digital Drone Interface Mashup\n");
88
 
87
  printf("\nusage:\n");
89
 
88
  printf("\t riddim [config_file]\n\n");
Line 90... Line -...
90
  //   bt_host_init();
-
 
-
 
89
 
91
 
90
  // check if config file as argument
92
  if (argv[1])
91
  if (argv[1])
93
    parse_config(argv[1]);
92
    parse_config(argv[1]);
Line 94... Line 93...
94
  else
93
  else
Line 217... Line 216...
217
 
216
 
Line 218... Line 217...
218
      gettimeofday(&loop_start_time,NULL);
217
      gettimeofday(&loop_start_time,NULL);
219
 
218
 
220
 
219
 
Line 221... Line 220...
221
      //      blink_evdev_led();
220
      //      blink_evdev_led();
Line 222... Line 221...
222
      //       bt_host_tick(mk_socket);
221
      bt_host_tick(mk_socket);
Line 604... Line 603...
604
      printf("loop fin ( confirmed:%d misses:%d | debug_sets:%d )\n",complete_matches,complete_misses,debug_sets);
603
      printf("loop fin ( confirmed:%d misses:%d | debug_sets:%d )\n",complete_matches,complete_misses,debug_sets);
605
      printf("------------------------------------------------------------------------\n");
604
      printf("------------------------------------------------------------------------\n");
Line 606... Line 605...
606
       
605
       
607
      gettimeofday(&loop_end_time,NULL);
606
      gettimeofday(&loop_end_time,NULL);
608
      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;
607
      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;
Line -... Line 608...
-
 
608
      printf("last trip: %ld\n",last_trip_time);
Line 609... Line 609...
609
      printf("last trip: %d\n",last_trip_time);
609
 
Line 610... Line 610...
610
 
610
      trip_count++;