Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1569 → Rev 1570

/dongfang_FC_rewrite_tool/src/dongfang/mkt/main/SimpleOSDTool.java
49,7 → 49,7
 
public static void main(String[] args) throws IOException {
SimpleOSDTool test = new SimpleOSDTool();
MKConnection _port = new MKTCPConnection(); // new RXTXSerialPort();
MKConnection _port = new MKTCPConnection(); //
_port.init("8080");
FrameQueue q = new FrameQueue(_port);
SimpleOSDView v = new SimpleOSDView ();
/dongfang_FC_rewrite_tool/src/dongfang/mkt/main/UniversalConfigurator.java
245,7 → 245,7
if ("w".equals(args[0]) && (args.length!=3 && args.length!=4)) help();
if ("r".equals(args[0]) && (args.length!=3 && args.length!=4)) help();
 
String portIdentifier = "COM10";
String portIdentifier = null;
if ("r".equals(args[0])) {
readConfiguration(portIdentifier, Integer.parseInt(args[1]));
/dongfang_FC_rewrite_tool/src/dongfang/mkt/ui/offscreendisplay/MapImageView.java
135,7 → 135,6
GPSPosition upperLeft = new GPSPosition();
GPSPosition lowerRight = new GPSPosition();
/*
upperLeft.setLatitude(47.328355);
upperLeft.setLongitude(8.518231);
 
143,20 → 142,16
lowerRight.setLatitude(47.321532);
lowerRight.setLongitude(8.530822);
// geotagged geo:lat=47.324614 geo:lon=8.528202
highlight.setLatitude(47.324714);
highlight.setLongitude(8.528102);
*/
upperLeft.setLatitude(47.344577);
upperLeft.setLongitude(8.529304);
// upperLeft.setLatitude(47.344577);
// upperLeft.setLongitude(8.529304);
 
// * l/r: geotagged geo:lat=47.321749 geo:lon=8.534403
lowerRight.setLatitude(47.337576);
lowerRight.setLongitude(8.542220);
// lowerRight.setLatitude(47.337576);
// lowerRight.setLongitude(8.542220);
setSize(MAPWIDTH, MAPHEIGHT);
this.upperLeft = upperLeft;
this.lowerRight = lowerRight;
mapImage = Toolkit.getDefaultToolkit().getImage("qth.jpg");
mapImage = Toolkit.getDefaultToolkit().getImage("flugplatz_large.jpg");
}
}
/dongfang_FC_rewrite_tool/src/dongfang/mkt/ui/offscreendisplay/VariousInfoPane.java
1,6 → 1,7
package dongfang.mkt.ui.offscreendisplay;
 
import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.GridLayout;
import java.util.Formatter;
import java.util.Locale;
17,15 → 18,22
import dongfang.mkt.frames.OSDDataResponseFrame;
 
public class VariousInfoPane extends JPanel implements OSDDataConsumer {
static class BigLabel extends JLabel {
public BigLabel() {
super();
setFont(getFont().deriveFont(Font.BOLD, 16));
}
}
 
class PositionsPanel extends JPanel implements OSDDataConsumer {
class CurrentPositionPanel extends JPanel {
JLabel lat;
JLabel lon;
BigLabel lat;
BigLabel lon;
 
void init() {
lat = new JLabel();
lon = new JLabel();
lat = new BigLabel();
lon = new BigLabel();
}
 
int getNumRows() {
47,11 → 55,11
}
 
class HomePositionPanel extends CurrentPositionPanel {
JLabel home;
BigLabel home;
 
void init() {
super.init();
home = new JLabel();
home = new BigLabel();
}
 
int getNumRows() {
118,16 → 126,16
 
class HeightsPanel extends JPanel implements OSDDataConsumer {
class HeightPanel extends JPanel implements OSDDataConsumer {
JLabel baroHeight;
JLabel GPSHeight;
JLabel baroVVI;
JLabel GPSVVI;
BigLabel baroHeight;
BigLabel GPSHeight;
BigLabel baroVVI;
BigLabel GPSVVI;
 
void init() {
baroHeight = new JLabel();
GPSHeight = new JLabel();
baroVVI = new JLabel();
GPSVVI = new JLabel();
baroHeight = new BigLabel();
GPSHeight = new BigLabel();
baroVVI = new BigLabel();
GPSVVI = new BigLabel();
}
 
int getNumRows() {
203,14 → 211,14
}
 
class SpeedHeadingPanel extends JPanel implements OSDDataConsumer {
JLabel noseDirection;
JLabel flightDirection;
JLabel speed;
BigLabel noseDirection;
BigLabel flightDirection;
BigLabel speed;
 
void init() {
noseDirection = new JLabel();
flightDirection = new JLabel();
speed = new JLabel();
noseDirection = new BigLabel();
flightDirection = new BigLabel();
speed = new BigLabel();
Border b = BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(), "Speed and heading");
setBorder(b);
253,6 → 261,7
class StatusPanel extends JPanel implements OSDDataConsumer {
JProgressBar dataAgeProgress;
JProgressBar battery;
BigLabel numberOfSatellites;
long dataTime = 0;
 
259,6 → 268,7
void init() {
dataAgeProgress = new JProgressBar(0, 5000);
battery = new JProgressBar(100, 130);
numberOfSatellites = new BigLabel();
//dataAgeProgress.setEnabled(false);
Border b = BorderFactory.createTitledBorder(
282,7 → 292,7
}
 
int getNumRows() {
return 2;
return 3;
}
 
void layoutSubs() {
290,6 → 300,8
add(dataAgeProgress);
add(new JLabel("Battery"));
add(battery);
add(new JLabel("Satellites"));
add(numberOfSatellites);
}
 
StatusPanel() {
303,6 → 315,7
return;
dataTime = System.currentTimeMillis();
battery.setValue(data.getBatteryVoltage());
numberOfSatellites.setText("" + data.getNumberOfSatellites());
}
}