summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0cd203e)
Every packet has RSSI info, so use the latest one available. This
makes telegps RSSI available as it never sends sensor packets (having
no sensors).
Signed-off-by: Keith Packard <keithp@keithp.com>
r = new AltosTelemetryRecordSensor(bytes, rssi);
break;
case packet_type_configuration:
r = new AltosTelemetryRecordSensor(bytes, rssi);
break;
case packet_type_configuration:
- r = new AltosTelemetryRecordConfiguration(bytes);
+ r = new AltosTelemetryRecordConfiguration(bytes, rssi);
break;
case packet_type_location:
break;
case packet_type_location:
- r = new AltosTelemetryRecordLocation(bytes);
+ r = new AltosTelemetryRecordLocation(bytes, rssi);
break;
case packet_type_satellite:
break;
case packet_type_satellite:
- r = new AltosTelemetryRecordSatellite(bytes);
+ r = new AltosTelemetryRecordSatellite(bytes, rssi);
break;
case packet_type_companion:
break;
case packet_type_companion:
- r = new AltosTelemetryRecordCompanion(bytes);
+ r = new AltosTelemetryRecordCompanion(bytes, rssi);
break;
case packet_type_MM_sensor:
r = new AltosTelemetryRecordMegaSensor(bytes, rssi);
break;
case packet_type_MM_data:
break;
case packet_type_MM_sensor:
r = new AltosTelemetryRecordMegaSensor(bytes, rssi);
break;
case packet_type_MM_data:
- r = new AltosTelemetryRecordMegaData(bytes);
+ r = new AltosTelemetryRecordMegaData(bytes, rssi);
- r = new AltosTelemetryRecordRaw(bytes);
+ r = new AltosTelemetryRecordRaw(bytes, rssi);
AltosRecordCompanion companion;
AltosRecordCompanion companion;
- public AltosTelemetryRecordCompanion(int[] in_bytes) {
- super(in_bytes);
+ public AltosTelemetryRecordCompanion(int[] in_bytes, int rssi) {
+ super(in_bytes, rssi);
int off = 0;
if (uint8(6) == 0)
int off = 0;
if (uint8(6) == 0)
String callsign;
String version;
String callsign;
String version;
- public AltosTelemetryRecordConfiguration(int[] in_bytes) {
- super(in_bytes);
+ public AltosTelemetryRecordConfiguration(int[] in_bytes, int rssi) {
+ super(in_bytes, rssi);
device_type = uint8(5);
flight = uint16(6);
device_type = uint8(5);
flight = uint16(6);
int climb_rate;
int course;
int climb_rate;
int course;
- public AltosTelemetryRecordLocation(int[] in_bytes) {
- super(in_bytes);
+ public AltosTelemetryRecordLocation(int[] in_bytes, int rssi) {
+ super(in_bytes, rssi);
flags = uint8(5);
altitude = int16(6);
flags = uint8(5);
altitude = int16(6);
- public AltosTelemetryRecordMegaData(int[] in_bytes) {
- super(in_bytes);
+ public AltosTelemetryRecordMegaData(int[] in_bytes, int rssi) {
+ super(in_bytes, rssi);
- int rssi;
-
- public AltosTelemetryRecordMegaSensor(int[] in_bytes, int in_rssi) {
- super(in_bytes);
+ public AltosTelemetryRecordMegaSensor(int[] in_bytes, int rssi) {
+ super(in_bytes, rssi);
accel = int16(6);
pres = int32(8);
accel = int16(6);
pres = int32(8);
mag_x = int16(26);
mag_y = int16(28);
mag_z = int16(30);
mag_x = int16(26);
mag_y = int16(28);
mag_z = int16(30);
}
public AltosRecord update_state(AltosRecord previous) {
}
public AltosRecord update_state(AltosRecord previous) {
next.mag.y = mag_y;
next.mag.z = mag_z;
next.mag.y = mag_y;
next.mag.z = mag_z;
next.seen |= AltosRecord.seen_sensor;
return next;
next.seen |= AltosRecord.seen_sensor;
return next;
int serial;
int tick;
int type;
int serial;
int tick;
int type;
return AltosLib.string(bytes, off + 1, l);
}
return AltosLib.string(bytes, off + 1, l);
}
- public AltosTelemetryRecordRaw(int[] in_bytes) {
+ public AltosTelemetryRecordRaw(int[] in_bytes, int in_rssi) {
bytes = in_bytes;
serial = uint16(0);
tick = uint16(2);
type = uint8(4);
bytes = in_bytes;
serial = uint16(0);
tick = uint16(2);
type = uint8(4);
}
public AltosRecord update_state(AltosRecord previous) {
}
public AltosRecord update_state(AltosRecord previous) {
next = new AltosRecordNone();
next.serial = serial;
next.tick = tick;
next = new AltosRecordNone();
next.serial = serial;
next.tick = tick;
int channels;
AltosGPSSat[] sats;
int channels;
AltosGPSSat[] sats;
- public AltosTelemetryRecordSatellite(int[] in_bytes) {
- super(in_bytes);
+ public AltosTelemetryRecordSatellite(int[] in_bytes, int rssi) {
+ super(in_bytes, rssi);
channels = uint8(5);
if (channels > 12)
channels = uint8(5);
if (channels > 12)
int accel_plus_g;
int accel_minus_g;
int accel_plus_g;
int accel_minus_g;
- int rssi;
-
- public AltosTelemetryRecordSensor(int[] in_bytes, int in_rssi) {
- super(in_bytes);
+ public AltosTelemetryRecordSensor(int[] in_bytes, int rssi) {
+ super(in_bytes, rssi);
state = uint8(5);
accel = int16(6);
state = uint8(5);
accel = int16(6);
ground_accel = int16(26);
accel_plus_g = int16(28);
accel_minus_g = int16(30);
ground_accel = int16(26);
accel_plus_g = int16(28);
accel_minus_g = int16(30);
}
public AltosRecord update_state(AltosRecord prev) {
}
public AltosRecord update_state(AltosRecord prev) {
next.accel_minus_g = AltosRecord.MISSING;
}
next.accel_minus_g = AltosRecord.MISSING;
}
next.seen |= AltosRecord.seen_sensor | AltosRecord.seen_temp_volt;
return next;
next.seen |= AltosRecord.seen_sensor | AltosRecord.seen_temp_volt;
return next;