Rev 1540 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1540 | Rev 1695 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | package dongfang.mkt.frames; |
1 | package dongfang.mkt.frames; |
Line 2... | Line 2... | ||
2 | 2 | ||
3 | public class AttitudeDataResponseFrame extends ResponseFrame { |
- | |
4 | // signed int Winkel[3]; // nick, roll, compass in 0,1� |
- | |
5 | // signed char reserve[8]; |
3 | public class AttitudeDataResponseFrame extends ResponseFrame { |
6 | private int pitch; |
4 | private float[] attitude; |
7 | private int roll; |
5 | private float[] rates; |
8 | private int heading; |
- | |
Line 9... | Line 6... | ||
9 | private int[] expansion; |
6 | private float[] acc; |
10 | 7 | ||
11 | public AttitudeDataResponseFrame(int address) { |
8 | public AttitudeDataResponseFrame(int address) { |
Line 12... | Line 9... | ||
12 | super(address); |
9 | super(address); |
13 | } |
10 | } |
14 | 11 | ||
15 | @Override |
12 | @Override |
Line 16... | Line 13... | ||
16 | public boolean isResponseTo(RequestFrame r) { |
13 | public boolean isResponseTo(RequestFrame r) { |
17 | return r instanceof AttitudeDataRequestFrame; |
14 | return r instanceof AttitudeDataRequestFrame; |
18 | } |
15 | } |
Line 19... | Line 16... | ||
19 | 16 | ||
20 | public int getPitch() { |
17 | public float[] getAttitude() { |
21 | return pitch; |
18 | return attitude; |
Line 22... | Line 19... | ||
22 | } |
19 | } |
23 | 20 | ||
24 | public void setPitch(int pitch) { |
21 | public void setAttitude(float[] attitude) { |
Line 25... | Line 22... | ||
25 | this.pitch = pitch; |
22 | this.attitude = attitude; |
26 | } |
23 | } |
27 | 24 | ||
Line 28... | Line 25... | ||
28 | public int getRoll() { |
25 | public float[] getRates() { |
29 | return roll; |
26 | return rates; |
30 | } |
27 | } |
Line 31... | Line 28... | ||
31 | 28 | ||
32 | public void setRoll(int roll) { |
29 | public void setRates(float[] rates) { |
33 | this.roll = roll; |
30 | this.rates = rates; |
34 | } |
31 | } |
35 | 32 | ||
36 | public int getHeading() { |
33 | public float[] getAcc() { |
37 | return heading; |
- | |
38 | } |
- | |
- | 34 | return acc; |
|
39 | 35 | } |
|
40 | public void setHeading(int heading) { |
36 | |
41 | this.heading = heading; |
37 | public void setAcc(float[] acc) { |
42 | } |
38 | this.acc = acc; |