Rev 82 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 82 | Rev 135 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | import java.io.*; |
13 | import java.io.*; |
Line 14... | Line 14... | ||
14 | 14 | ||
Line 15... | Line 15... | ||
15 | public class UFOProber |
15 | public class UFOProber |
16 | 16 | ||
17 | { |
17 | { |
18 | public final static int PROBE_RESULT_NONE=0; |
18 | public final static int PROBE_RESULT_NONE =0; |
- | 19 | public final static int PROBE_RESULT_MK =1; |
|
- | 20 | public final static int PROBE_RESULT_NG =2; |
|
- | 21 | public final static int PROBE_RESULT_NAVCTRL =3; |
|
- | 22 | ||
- | 23 | ||
- | 24 | public boolean change_notify=false; |
|
Line 19... | Line 25... | ||
19 | public final static int PROBE_RESULT_MK=1; |
25 | |
- | 26 | public String[] extended_names= { "No Device" , "MK-Connection" , "NG-Connection" , "NavCtrl-Connection" }; |
|
- | 27 | ||
- | 28 | public int probe_result=PROBE_RESULT_NONE; |
|
- | 29 | ||
- | 30 | ||
- | 31 | public void set_to_navi() |
|
- | 32 | { |
|
- | 33 | if (probe_result!=PROBE_RESULT_NAVCTRL); |
|
- | 34 | { |
|
- | 35 | probe_result=PROBE_RESULT_NAVCTRL; |
|
- | 36 | change_notify=true; |
|
- | 37 | } |
|
- | 38 | } |
|
- | 39 | ||
- | 40 | public void set_to_mk() |
|
- | 41 | { |
|
- | 42 | if (probe_result!=PROBE_RESULT_MK) |
|
- | 43 | { |
|
- | 44 | probe_result=PROBE_RESULT_MK; |
|
- | 45 | change_notify=true; |
|
- | 46 | } |
|
- | 47 | } |
|
- | 48 | ||
- | 49 | public boolean is_navi() |
|
- | 50 | { |
|
- | 51 | return (probe_result==PROBE_RESULT_NAVCTRL); |
|
- | 52 | } |
|
- | 53 | ||
- | 54 | public boolean is_mk() |
|
- | 55 | { |
|
- | 56 | return (probe_result==PROBE_RESULT_MK); |
|
- | 57 | } |
|
- | 58 | ||
- | 59 | ||
- | 60 | public String extended_name() |
|
- | 61 | { |
|
20 | public final static int PROBE_RESULT_NG=2; |
62 | return extended_names[probe_result]; |
21 | 63 | } |
|
Line 22... | Line 64... | ||
22 | public int probe_result=PROBE_RESULT_NONE; |
64 | |
23 | String reply=""; |
65 | String reply=""; |