Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1563 → Rev 1564

/dongfang_FC_rewrite_tool/src/dongfang/mkt/main/MKDebugLogger.java
84,6 → 84,7
 
public void log(DebugResponseFrame f, long timestamp)
throws IOException {
if (f==null) return;
w.write(" <dataset timestamp=\"" + timestamp + "\">\n");
for (int i = 0; i < 32; i++) {
w.write(" <data offset=\"" + i + "\" label=\"" + labels[i]
202,8 → 203,8
public static void main(String[] args) throws IOException {
MKDebugLogger test = new MKDebugLogger();
 
MKConnection port = new MKTCPConnection(); //RXTXSerialPort();
port.init("8080");
MKConnection port = new RXTXSerialPort();
port.init(null);
 
FrameQueue q = new FrameQueue(port);
String encoding = "iso-8859-1";
/dongfang_FC_rewrite_tool/src/dongfang/mkt/main/OSDLogger.java
17,8 → 17,6
import dongfang.mkt.comm.serial.RXTXSerialPort;
import dongfang.mkt.frames.OSDDataRequestFrame;
import dongfang.mkt.frames.OSDDataResponseFrame;
import dongfang.mkt.frames.OSDDataResponseFrame.GPSDistanceAndBearing;
import dongfang.mkt.frames.OSDDataResponseFrame.GPSPosition;
 
public class OSDLogger {
private static final PrintStream STDERR = System.out;
70,7 → 68,6
 
w.write(" <waypoints index=\"" + f.getWaypointIndex() + "\" count=\"" + f.getWaypointCount() + "\"/>\n");
w.write(" <height barometric=\"" + f.getHeightByPressure() + "\" barometricVerticalVelocity=\"" + f.getVerticalVelocityByPressure() + "\" gpsVerticalVelocity=\"" + f.getVerticalVelocityByGPS() + "\"/>\n");
w.write(" <height barometric=\"" + f.getHeightByPressure() + "\"/>\n");
 
w.write(" <status rcQuality=\"" + f.getRcQuality() + "\" fcflags=\"" + f.getFcFlags() + "\" fcflags2=\"" + f.getFcFlags2() + "\" ncflags=\"" + f.getNcFlags() + "\" errorCode=\"" + f.getErrorCode() + "\" numberOfSatellites=\"" + f.getNumberOfSatellites() + "\"/>\n");
w.write(" <flight time=\"" + f.getFlightTime() + "\" batteryVoltage=\"" + f.getBatteryVoltage() + "\" throttle=\"" + f.getThrottle() + "\" current=\"" + f.getCurrent() + "\" capacityUsed=\"" + f.getCapacityUsed() + "\"/>\n");
/dongfang_FC_rewrite_tool/src/dongfang/mkt/main/UniversalConfigurator.java
63,7 → 63,7
}
 
private static ConfigSet readConfiguration(String portIdentifier, int parameterSetNumber) throws IOException {
MKConnection port = new MKTCPConnection(); //new RXTXSerialPort();//
MKConnection port = new RXTXSerialPort();
port.init(portIdentifier);
FrameQueue q = new FrameQueue(port);
ConfigSet cs = null;
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 = "8080";
String portIdentifier = null;
if ("r".equals(args[0])) {
readConfiguration(portIdentifier, Integer.parseInt(args[1]));