Permalink
Browse files

Merge pull request #52 from PhoenixPilot/james/android_copyright

AndroidGCS copyright
  • Loading branch information...
2 parents 8a22d79 + 5770cc0 commit f7dce5af863105f13ad1e5db79ccd60ab0cf3865 @lilvinz lilvinz committed Dec 7, 2012
Showing with 223 additions and 330 deletions.
  1. +1 −1 androidgcs/res/values/strings.xml
  2. +1 −1 androidgcs/res/xml/preferences.xml
  3. +1 −1 androidgcs/src/org/openpilot/androidgcs/AttitudeView.java
  4. +1 −1 androidgcs/src/org/openpilot/androidgcs/BluetoothDevicePreference.java
  5. +0 −154 androidgcs/src/org/openpilot/androidgcs/BluetoothUAVTalk.java
  6. +1 −1 androidgcs/src/org/openpilot/androidgcs/CompassView.java
  7. +1 −1 androidgcs/src/org/openpilot/androidgcs/Controller.java
  8. +1 −1 androidgcs/src/org/openpilot/androidgcs/FragmentTester.java
  9. +1 −1 androidgcs/src/org/openpilot/androidgcs/HomePage.java
  10. +1 −1 androidgcs/src/org/openpilot/androidgcs/Logger.java
  11. +1 −1 androidgcs/src/org/openpilot/androidgcs/ObjectBrowser.java
  12. +23 −0 androidgcs/src/org/openpilot/androidgcs/ObjectEditView.java
  13. +1 −1 androidgcs/src/org/openpilot/androidgcs/ObjectEditor.java
  14. +1 −1 androidgcs/src/org/openpilot/androidgcs/ObjectManagerActivity.java
  15. +24 −1 androidgcs/src/org/openpilot/androidgcs/OsgViewer.java
  16. +1 −1 androidgcs/src/org/openpilot/androidgcs/PfdActivity.java
  17. +1 −3 androidgcs/src/org/openpilot/androidgcs/Preferences.java
  18. +1 −1 androidgcs/src/org/openpilot/androidgcs/SystemAlarmActivity.java
  19. +0 −114 androidgcs/src/org/openpilot/androidgcs/TcpUAVTalk.java
  20. +1 −1 androidgcs/src/org/openpilot/androidgcs/TelemetryWidget.java
  21. +23 −0 androidgcs/src/org/openpilot/androidgcs/TuningActivity.java
  22. +1 −1 androidgcs/src/org/openpilot/androidgcs/UAVLocation.java
  23. +1 −1 androidgcs/src/org/openpilot/androidgcs/fragments/MapPositioner.java
  24. +1 −1 androidgcs/src/org/openpilot/androidgcs/fragments/ObjectManagerFragment.java
  25. +1 −1 androidgcs/src/org/openpilot/androidgcs/fragments/PFD.java
  26. +1 −1 androidgcs/src/org/openpilot/androidgcs/fragments/SystemAlarmsFragment.java
  27. +1 −1 androidgcs/src/org/openpilot/androidgcs/telemetry/BluetoothUAVTalk.java
  28. +23 −0 androidgcs/src/org/openpilot/androidgcs/telemetry/HidUAVTalk.java
  29. +1 −1 androidgcs/src/org/openpilot/androidgcs/telemetry/OPTelemetryService.java
  30. +1 −1 androidgcs/src/org/openpilot/androidgcs/telemetry/TcpUAVTalk.java
  31. +23 −0 androidgcs/src/org/openpilot/androidgcs/telemetry/TelemetryTask.java
  32. +24 −0 androidgcs/src/org/openpilot/androidgcs/util/ObjectFieldMappable.java
  33. +1 −1 androidgcs/src/org/openpilot/androidgcs/util/SmartSave.java
  34. +23 −0 androidgcs/src/org/openpilot/androidgcs/views/ScrollBarView.java
  35. +1 −1 androidgcs/src/org/openpilot/uavtalk/Telemetry.java
  36. +1 −1 androidgcs/src/org/openpilot/uavtalk/TelemetryMonitor.java
  37. +1 −1 androidgcs/src/org/openpilot/uavtalk/UAVDataObject.java
  38. +1 −1 androidgcs/src/org/openpilot/uavtalk/UAVMetaObject.java
  39. +1 −1 androidgcs/src/org/openpilot/uavtalk/UAVObject.java
  40. +1 −1 androidgcs/src/org/openpilot/uavtalk/UAVObjectField.java
  41. +1 −1 androidgcs/src/org/openpilot/uavtalk/UAVObjectManager.java
  42. +1 −1 androidgcs/src/org/openpilot/uavtalk/UAVTalk.java
  43. +8 −7 androidgcs/src/org/openpilot/uavtalk/uavobjects/FirmwareIAPObj.java
  44. +8 −7 androidgcs/src/org/openpilot/uavtalk/uavobjects/FlightTelemetryStats.java
  45. +8 −7 androidgcs/src/org/openpilot/uavtalk/uavobjects/GCSTelemetryStats.java
  46. +2 −4 androidgcs/src/org/openpilot/uavtalk/uavobjects/TelemObjectsInitialize.java
  47. +1 −1 ground/openpilotgcs/src/plugins/config/calibration.cpp
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">OpenPilot GCS Home</string>
+ <string name="app_name">PhoneixPilot GCS</string>
<string name="object_browser_name">Browser</string>
<string name="controller_name">Controller</string>
<string name="pfd_name">PFD</string>
@@ -13,7 +13,7 @@
android:key="ip_address" />
<EditTextPreference android:name="port"
android:summary="Enter a TCP/IP port here"
- android:defaultValue="9001" android:title="Port:"
+ android:defaultValue="9000" android:title="Port:"
android:key="port" />
<org.openpilot.androidgcs.BluetoothDevicePreference android:name="bt_adapter"
android:key="bluetooth_mac"
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file AttitudeView.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief A view for UAV attitude.
* @see The GNU Public License (GPL) Version 3
*
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file BluetoothDevicePreference.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief A dialog in the preferences options that shows the paired BT
* devices.
* @see The GNU Public License (GPL) Version 3
@@ -1,154 +0,0 @@
-package org.openpilot.androidgcs;
-
-import java.io.IOException;
-import java.util.Set;
-import java.util.UUID;
-
-import org.openpilot.uavtalk.UAVObjectManager;
-import org.openpilot.uavtalk.UAVTalk;
-
-import android.annotation.TargetApi;
-import android.app.Activity;
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothSocket;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.preference.PreferenceManager;
-import android.util.Log;
-
-@TargetApi(10) public class BluetoothUAVTalk {
- private final String TAG = "BluetoothUAVTalk";
- public static int LOGLEVEL = 2;
- public static boolean WARN = LOGLEVEL > 1;
- public static boolean DEBUG = LOGLEVEL > 0;
-
- // Temporarily define fixed device name
- private String device_name = "RN42-222D";
- private final static UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
-
- private BluetoothAdapter mBluetoothAdapter;
- private BluetoothSocket socket;
- private BluetoothDevice device;
- private UAVTalk uavTalk;
- private boolean connected;
-
- public BluetoothUAVTalk(Context caller) {
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(caller);
- device_name = prefs.getString("bluetooth_mac","");
-
- if (DEBUG) Log.d(TAG, "Trying to open UAVTalk with " + device_name);
-
- connected = false;
- device = null;
-
- mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
- if (mBluetoothAdapter == null) {
- // Device does not support Bluetooth
- Log.e(TAG, "Device does not support Bluetooth");
- return;
- }
-
- if (!mBluetoothAdapter.isEnabled()) {
- // Enable bluetooth if it isn't already
- Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
- caller.sendOrderedBroadcast(enableBtIntent, "android.permission.BLUETOOTH_ADMIN", new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- Log.e(TAG,"Received " + context + intent);
- //TODO: some logic here to see if it worked
- queryDevices();
- }
- }, null, Activity.RESULT_OK, null, null);
- } else {
- queryDevices();
- }
- }
-
- public boolean connect(UAVObjectManager objMngr) {
- if( getConnected() )
- return true;
- if( !getFoundDevice() )
- return false;
- if( !openTelemetryBluetooth(objMngr) )
- return false;
- return true;
- }
-
- public boolean getConnected() {
- return connected;
- }
-
- public boolean getFoundDevice() {
- return (device != null);
- }
-
- public UAVTalk getUavtalk() {
- return uavTalk;
- }
-
- private void queryDevices() {
- Log.d(TAG, "Searching for devices");
- Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
- // If there are paired devices
- if (pairedDevices.size() > 0) {
- // Loop through paired devices
- for (BluetoothDevice device : pairedDevices) {
- // Add the name and address to an array adapter to show in a ListView
- //mArrayAdapter.add(device.getName() + "\n" + device.getAddress());
- Log.d(TAG, "Paired device: " + device.getAddress() + " compared to " + device_name);
- if(device.getAddress().compareTo(device_name) == 0) {
- Log.d(TAG, "Found device: " + device.getName());
- this.device = device;
- return;
- }
- }
- }
-
- }
-
- private boolean openTelemetryBluetooth(UAVObjectManager objMngr) {
- Log.d(TAG, "Opening connection to " + device.getName());
- socket = null;
- connected = false;
- try {
- socket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID);
- } catch (IOException e) {
- Log.e(TAG,"Unable to create Rfcomm socket");
- return false;
- //e.printStackTrace();
- }
-
- mBluetoothAdapter.cancelDiscovery();
-
- try {
- socket.connect();
- }
- catch (IOException e) {
- Log.e(TAG,"Unable to connect to requested device", e);
- try {
- socket.close();
- } catch (IOException e2) {
- Log.e(TAG, "unable to close() socket during connection failure", e2);
- }
- return false;
- }
-
- connected = true;
-
- try {
- uavTalk = new UAVTalk(socket.getInputStream(), socket.getOutputStream(), objMngr);
- } catch (IOException e) {
- Log.e(TAG,"Error starting UAVTalk");
- // TODO Auto-generated catch block
- //e.printStackTrace();
- return false;
- }
-
- return true;
- }
-
-}
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file CompassView.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief A view of the compass heading.
* @see The GNU Public License (GPL) Version 3
*
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file Controller.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief Allows controlling the UAV over telemetry. This activity
* pushes the appropriate settings to the remote device for it to
* listen to the GCSReceiver.
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file FragmentTester.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief An activity that displays the SystemAlarmsFragment.
* @see The GNU Public License (GPL) Version 3
*****************************************************************************/
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file HomePage.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief Main launch page for the Android GCS actitivies
* @see The GNU Public License (GPL) Version 3
*
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file Logger.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief Controller for logging data as well as interface for getting that
* data on and off the tablet.
* @see The GNU Public License (GPL) Version 3
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file ObjectBrowser.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief A simple object browser for UAVOs that allows viewing, editing,
* loading and saving.
* @see The GNU Public License (GPL) Version 3
@@ -1,3 +1,26 @@
+/**
+ ******************************************************************************
+ * @file ObjectEditView.java
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
+ * @brief The view for editing a UAVO
+ * @see The GNU Public License (GPL) Version 3
+ *
+ *****************************************************************************/
+/*
+ * 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
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
package org.openpilot.androidgcs;
import java.util.ArrayList;
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file ObjectEditor.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief A popup dialog for editing the contents of a UAVO.
* @see The GNU Public License (GPL) Version 3
*
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file ObjectManagerActivity.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief Base object for all activies that use the UAVObjectManager.
* This class takes care of binding to the service and getting the
* object manager as well as setting up callbacks to the objects of
@@ -1,3 +1,26 @@
+/**
+ ******************************************************************************
+ * @file OsgViewer.java
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
+ * @brief Visualize a model with OSG
+ * @see The GNU Public License (GPL) Version 3
+ *
+ *****************************************************************************/
+/*
+ * 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
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
package org.openpilot.androidgcs;
import org.openpilot.osg.ColorPickerDialog;
@@ -295,7 +318,7 @@ public void colorChange(int color) {
private float sqrDistance(MotionEvent event) {
float x = event.getX(0) - event.getX(1);
float y = event.getY(0) - event.getY(1);
- return (float)(FloatMath.sqrt(x * x + y * y));
+ return (FloatMath.sqrt(x * x + y * y));
}
// The below methods should all be called by the parent activity at the appropriate times
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file PfdActivity.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief Shows the PFD activity.
* @see The GNU Public License (GPL) Version 3
*****************************************************************************/
@@ -1,10 +1,9 @@
/**
******************************************************************************
* @file Preferences.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief Displays the preferences dialog.
* @see The GNU Public License (GPL) Version 3
- *
*****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify
@@ -21,7 +20,6 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
package org.openpilot.androidgcs;
import android.os.Bundle;
@@ -1,7 +1,7 @@
/**
******************************************************************************
* @file SystemAlarmActivity.java
- * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
+ * @author PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012
* @brief An activity that displays the SystemAlarmsFragment.
* @see The GNU Public License (GPL) Version 3
*****************************************************************************/
Oops, something went wrong.

0 comments on commit f7dce5a

Please sign in to comment.