*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.TextView;
+import android.view.*;
+import android.widget.*;
private TextView distance_view;
private TextView latitude_view;
private TextView longitude_view;
private TextView distance_view;
private TextView latitude_view;
private TextView longitude_view;
private TextView apogee_voltage_view;
private TextView apogee_voltage_label;
private GoNoGoLights apogee_lights;
private TextView apogee_voltage_view;
private TextView apogee_voltage_label;
private GoNoGoLights apogee_lights;
private TextView main_voltage_view;
private TextView main_voltage_label;
private GoNoGoLights main_lights;
private TextView main_voltage_view;
private TextView main_voltage_label;
private GoNoGoLights main_lights;
latitude_view = (TextView) v.findViewById(R.id.lat_value);
longitude_view = (TextView) v.findViewById(R.id.lon_value);
latitude_view = (TextView) v.findViewById(R.id.lat_value);
longitude_view = (TextView) v.findViewById(R.id.lon_value);
apogee_voltage_view = (TextView) v.findViewById(R.id.apogee_voltage_value);
apogee_lights = new GoNoGoLights((ImageView) v.findViewById(R.id.apogee_redled),
(ImageView) v.findViewById(R.id.apogee_greenled),
getResources());
apogee_voltage_label = (TextView) v.findViewById(R.id.apogee_voltage_label);
apogee_voltage_view = (TextView) v.findViewById(R.id.apogee_voltage_value);
apogee_lights = new GoNoGoLights((ImageView) v.findViewById(R.id.apogee_redled),
(ImageView) v.findViewById(R.id.apogee_greenled),
getResources());
apogee_voltage_label = (TextView) v.findViewById(R.id.apogee_voltage_label);
main_voltage_view = (TextView) v.findViewById(R.id.main_voltage_value);
main_lights = new GoNoGoLights((ImageView) v.findViewById(R.id.main_redled),
(ImageView) v.findViewById(R.id.main_greenled),
main_voltage_view = (TextView) v.findViewById(R.id.main_voltage_value);
main_lights = new GoNoGoLights((ImageView) v.findViewById(R.id.main_redled),
(ImageView) v.findViewById(R.id.main_greenled),
public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) {
if (state != null) {
set_value(speed_view, AltosConvert.speed, 6, state.speed());
set_value(height_view, AltosConvert.height, 6, state.height());
set_value(max_speed_view, AltosConvert.speed, 6, state.max_speed());
public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) {
if (state != null) {
set_value(speed_view, AltosConvert.speed, 6, state.speed());
set_value(height_view, AltosConvert.height, 6, state.height());
set_value(max_speed_view, AltosConvert.speed, 6, state.max_speed());
- set_value(max_height_view, AltosConvert.speed, 6, state.max_height());
+ set_value(max_height_view, AltosConvert.height, 6, state.max_height());
if (from_receiver != null) {
elevation_view.setText(AltosDroid.number("%3.0f°", from_receiver.elevation));
set_value(range_view, AltosConvert.distance, 6, from_receiver.range);
if (from_receiver != null) {
elevation_view.setText(AltosDroid.number("%3.0f°", from_receiver.elevation));
set_value(range_view, AltosConvert.distance, 6, from_receiver.range);