Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

Commit a337d81

Browse files
committed
Merge branch 'beta' (release v2.4) into master branch.
2 parents 5c9165d + 144efa0 commit a337d81

24 files changed

+148
-149
lines changed

FtcRobotController/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
44
package="com.qualcomm.ftcrobotcontroller"
5-
android:versionCode="14"
6-
android:versionName="2.35">
5+
android:versionCode="15"
6+
android:versionName="2.4">
77

88
<application
99
android:allowBackup="true"

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/TemplateOpMode_Iterative.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ public class TemplateOpMode_Iterative extends OpMode
6363
{
6464
/* Declare OpMode members. */
6565
private ElapsedTime runtime = new ElapsedTime();
66-
67-
// private DcMotor leftMotor = null;
68-
// private DcMotor rightMotor = null;
66+
private DcMotor leftMotor = null;
67+
private DcMotor rightMotor = null;
6968

7069
/*
7170
* Code to run ONCE when the driver hits INIT

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/TemplateOpMode_Linear.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public class TemplateOpMode_Linear extends LinearOpMode {
5858

5959
/* Declare OpMode members. */
6060
private ElapsedTime runtime = new ElapsedTime();
61-
// DcMotor leftMotor = null;
62-
// DcMotor rightMotor = null;
61+
DcMotor leftMotor = null;
62+
DcMotor rightMotor = null;
6363

6464
@Override
6565
public void runOpMode() {

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/internal/FtcRobotControllerActivity.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3737
import android.content.Context;
3838
import android.content.Intent;
3939
import android.content.ServiceConnection;
40+
import android.content.SharedPreferences;
4041
import android.content.res.Configuration;
42+
import android.content.res.Resources;
4143
import android.hardware.usb.UsbDevice;
4244
import android.hardware.usb.UsbManager;
4345
import android.net.wifi.WifiManager;
@@ -255,6 +257,7 @@ public void onClick(View v) {
255257

256258
wifiLock.acquire();
257259
callback.networkConnectionUpdate(WifiDirectAssistant.Event.DISCONNECTED);
260+
readNetworkType(NETWORK_TYPE_FILENAME);
258261
bindToService();
259262
}
260263

@@ -295,7 +298,6 @@ public boolean onTouch(View v, MotionEvent event) {
295298
protected void onResume() {
296299
super.onResume();
297300
RobotLog.vv(TAG, "onResume()");
298-
readNetworkType(NETWORK_TYPE_FILENAME);
299301
}
300302

301303
@Override
@@ -361,6 +363,12 @@ protected void readNetworkType(String fileName) {
361363
String fileContents = readFile(networkTypeFile);
362364
networkType = NetworkConnectionFactory.getTypeFromString(fileContents);
363365
programmingModeController.setCurrentNetworkType(networkType);
366+
367+
// update the preferences
368+
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
369+
SharedPreferences.Editor editor = preferences.edit();
370+
editor.putString(NetworkConnectionFactory.NETWORK_CONNECTION_TYPE, networkType.toString());
371+
editor.commit();
364372
}
365373

366374
private String readFile(File file) {
@@ -488,7 +496,13 @@ private void requestRobotSetup() {
488496
HardwareFactory factory;
489497
RobotConfigFile file = cfgFileMgr.getActiveConfigAndUpdateUI();
490498
HardwareFactory hardwareFactory = new HardwareFactory(context);
491-
hardwareFactory.setXmlPullParser(file.getXml());
499+
try {
500+
hardwareFactory.setXmlPullParser(file.getXml());
501+
} catch (Resources.NotFoundException e) {
502+
file = RobotConfigFile.noConfig(cfgFileMgr);
503+
hardwareFactory.setXmlPullParser(file.getXml());
504+
cfgFileMgr.setActiveConfigAndUpdateUI(false, file);
505+
}
492506
factory = hardwareFactory;
493507

494508
eventLoop = new FtcEventLoop(factory, createOpModeRegister(), callback, this, programmingModeController);

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,42 @@ For technical questions regarding the SDK, please visit the FTC Technology forum
2222

2323
http://ftcforum.usfirst.org/forumdisplay.php?156-FTC-Technology
2424

25+
26+
**************************************************************************************
27+
28+
Version 2.4 (released on 16.11.13)
29+
* Fix to avoid crashing for nonexistent resources.
30+
* Blocks Programming mode changes:
31+
- Added blocks to support OpenGLMatrix, MatrixF, and VectorF.
32+
- Added blocks to support AngleUnit, AxesOrder, AxesReference, CameraDirection, CameraMonitorFeedback, DistanceUnit, and TempUnit.
33+
- Added blocks to support Acceleration.
34+
- Added blocks to support LinearOpMode.getRuntime.
35+
- Added blocks to support MagneticFlux and Position.
36+
- Fixed typos.
37+
- Made blocks for ElapsedTime more consistent with other objects.
38+
- Added blocks to support Quaternion, Velocity, Orientation, AngularVelocity.
39+
- Added blocks to support VuforiaTrackables, VuforiaTrackable, VuforiaLocalizer, VuforiaTrackableDefaultListener.
40+
- Fixed a few blocks.
41+
- Added type checking to new blocks.
42+
- Updated to latest blockly.
43+
- Added default variable blocks to navigation and matrix blocks.
44+
- Fixed toolbox entry for openGLMatrix_rotation_withAxesArgs.
45+
- When user downloads Blocks-generated op mode, only the .blk file is downloaded.
46+
- When user uploads Blocks-generated op mode (.blk file), Javascript code is auto generated.
47+
- Added DbgLog support.
48+
- Added logging when a blocks file is read/written.
49+
- Fixed bug to properly render blocks even if missing devices from configuration file.
50+
- Added support for additional characters (not just alphanumeric) for the block file names (for download and upload).
51+
- Added support for OpMode flavor (“Autonomous” or “TeleOp”) and group.
52+
* Changes to Samples to prevent tutorial issues.
53+
* Incorporated suggested changes from public pull 216 (“Replace .. paths”).
54+
* Remove Servo Glitches when robot stopped.
55+
* if user hits “Cancels” when editing a configuration file, clears the unsaved changes and reverts to original unmodified configuration.
56+
* Added log info to help diagnose why the Robot Controller app was terminated (for example, by watch dog function).
57+
* Added ability to transfer log from the controller.
58+
* Fixed inconsistency for AngularVelocity
59+
* Limit unbounded growth of data for telemetry. If user does not call telemetry.update() for LinearOpMode in a timely manner, data added for telemetry might get lost if size limit is exceeded.
60+
2561
**************************************************************************************
2662

2763
Version 2.35 (released on 16.10.06)

build.common.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ android {
2828
debug {
2929
keyAlias 'androiddebugkey'
3030
keyPassword 'android'
31-
storeFile file('../libs/ftc.debug.keystore')
31+
storeFile rootProject.file('libs/ftc.debug.keystore')
3232
storePassword 'android'
3333
}
3434
}
@@ -50,7 +50,7 @@ android {
5050
* @see <a href="http://developer.android.com/tools/building/configuring-gradle.html">Configure Your Build</a>
5151
* @see <a href="http://developer.android.com/tools/publishing/versioning.html">Versioning Your App</a>
5252
*/
53-
def manifestFile = file('../FtcRobotController/src/main/AndroidManifest.xml');
53+
def manifestFile = project(':FtcRobotController').file('src/main/AndroidManifest.xml');
5454
def manifestText = manifestFile.getText()
5555
//
5656
def vCodePattern = Pattern.compile("versionCode=\"(\\d+(\\.\\d+)*)\"")
@@ -91,13 +91,13 @@ android {
9191

9292
sourceSets.main {
9393
jni.srcDirs = []
94-
jniLibs.srcDir "../libs"
94+
jniLibs.srcDir rootProject.file('libs')
9595
}
9696
}
9797

9898
repositories {
9999
flatDir {
100-
dirs '../libs'
100+
dirs rootProject.file('libs')
101101
}
102102
}
103103

70.8 KB
Binary file not shown.
81.4 KB
Binary file not shown.

doc/javadoc/com/qualcomm/ftccommon/package-tree.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,27 +87,27 @@ <h2 title="Class Hierarchy">Class Hierarchy</h2>
8787
</li>
8888
<li type="circle">Activity
8989
<ul>
90-
<li type="circle">com.qualcomm.ftccommon.<a href="../../../com/qualcomm/ftccommon/FtcWifiChannelSelectorActivity.html" title="class in com.qualcomm.ftccommon"><span class="strong">FtcWifiChannelSelectorActivity</span></a></li>
90+
<li type="circle">com.qualcomm.ftccommon.<a href="../../../com/qualcomm/ftccommon/AboutActivity.html" title="class in com.qualcomm.ftccommon"><span class="strong">AboutActivity</span></a></li>
9191
</ul>
9292
</li>
9393
<li type="circle">Activity
9494
<ul>
95-
<li type="circle">com.qualcomm.ftccommon.<a href="../../../com/qualcomm/ftccommon/AboutActivity.html" title="class in com.qualcomm.ftccommon"><span class="strong">AboutActivity</span></a></li>
95+
<li type="circle">com.qualcomm.ftccommon.<a href="../../../com/qualcomm/ftccommon/FtcWifiChannelSelectorActivity.html" title="class in com.qualcomm.ftccommon"><span class="strong">FtcWifiChannelSelectorActivity</span></a></li>
9696
</ul>
9797
</li>
9898
<li type="circle">Activity
9999
<ul>
100-
<li type="circle">com.qualcomm.ftccommon.<a href="../../../com/qualcomm/ftccommon/ViewLogsActivity.html" title="class in com.qualcomm.ftccommon"><span class="strong">ViewLogsActivity</span></a></li>
100+
<li type="circle">com.qualcomm.ftccommon.<a href="../../../com/qualcomm/ftccommon/FtcRobotControllerSettingsActivity.html" title="class in com.qualcomm.ftccommon"><span class="strong">FtcRobotControllerSettingsActivity</span></a></li>
101101
</ul>
102102
</li>
103103
<li type="circle">Activity
104104
<ul>
105-
<li type="circle">com.qualcomm.ftccommon.<a href="../../../com/qualcomm/ftccommon/ConfigWifiDirectActivity.html" title="class in com.qualcomm.ftccommon"><span class="strong">ConfigWifiDirectActivity</span></a></li>
105+
<li type="circle">com.qualcomm.ftccommon.<a href="../../../com/qualcomm/ftccommon/ViewLogsActivity.html" title="class in com.qualcomm.ftccommon"><span class="strong">ViewLogsActivity</span></a></li>
106106
</ul>
107107
</li>
108108
<li type="circle">Activity
109109
<ul>
110-
<li type="circle">com.qualcomm.ftccommon.<a href="../../../com/qualcomm/ftccommon/FtcRobotControllerSettingsActivity.html" title="class in com.qualcomm.ftccommon"><span class="strong">FtcRobotControllerSettingsActivity</span></a></li>
110+
<li type="circle">com.qualcomm.ftccommon.<a href="../../../com/qualcomm/ftccommon/ConfigWifiDirectActivity.html" title="class in com.qualcomm.ftccommon"><span class="strong">ConfigWifiDirectActivity</span></a></li>
111111
</ul>
112112
</li>
113113
<li type="circle">Binder

doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/package-tree.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,19 @@ <h2 title="Interface Hierarchy">Interface Hierarchy</h2>
101101
</ul>
102102
<h2 title="Annotation Type Hierarchy">Annotation Type Hierarchy</h2>
103103
<ul>
104+
<li type="circle">com.qualcomm.robotcore.eventloop.opmode.<a href="../../../../../com/qualcomm/robotcore/eventloop/opmode/OpModeRegistrar.html" title="annotation in com.qualcomm.robotcore.eventloop.opmode"><span class="strong">OpModeRegistrar</span></a> (implements java.lang.annotation.Annotation)</li>
104105
<li type="circle">com.qualcomm.robotcore.eventloop.opmode.<a href="../../../../../com/qualcomm/robotcore/eventloop/opmode/Autonomous.html" title="annotation in com.qualcomm.robotcore.eventloop.opmode"><span class="strong">Autonomous</span></a> (implements java.lang.annotation.Annotation)</li>
105106
<li type="circle">com.qualcomm.robotcore.eventloop.opmode.<a href="../../../../../com/qualcomm/robotcore/eventloop/opmode/Disabled.html" title="annotation in com.qualcomm.robotcore.eventloop.opmode"><span class="strong">Disabled</span></a> (implements java.lang.annotation.Annotation)</li>
106107
<li type="circle">com.qualcomm.robotcore.eventloop.opmode.<a href="../../../../../com/qualcomm/robotcore/eventloop/opmode/TeleOp.html" title="annotation in com.qualcomm.robotcore.eventloop.opmode"><span class="strong">TeleOp</span></a> (implements java.lang.annotation.Annotation)</li>
107-
<li type="circle">com.qualcomm.robotcore.eventloop.opmode.<a href="../../../../../com/qualcomm/robotcore/eventloop/opmode/OpModeRegistrar.html" title="annotation in com.qualcomm.robotcore.eventloop.opmode"><span class="strong">OpModeRegistrar</span></a> (implements java.lang.annotation.Annotation)</li>
108108
</ul>
109109
<h2 title="Enum Hierarchy">Enum Hierarchy</h2>
110110
<ul>
111111
<li type="circle">java.lang.Object
112112
<ul>
113113
<li type="circle">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T&gt;, java.io.Serializable)
114114
<ul>
115-
<li type="circle">com.qualcomm.robotcore.eventloop.opmode.<a href="../../../../../com/qualcomm/robotcore/eventloop/opmode/OpModeManagerImpl.OpModeState.html" title="enum in com.qualcomm.robotcore.eventloop.opmode"><span class="strong">OpModeManagerImpl.OpModeState</span></a></li>
116115
<li type="circle">com.qualcomm.robotcore.eventloop.opmode.<a href="../../../../../com/qualcomm/robotcore/eventloop/opmode/OpModeMeta.Flavor.html" title="enum in com.qualcomm.robotcore.eventloop.opmode"><span class="strong">OpModeMeta.Flavor</span></a></li>
116+
<li type="circle">com.qualcomm.robotcore.eventloop.opmode.<a href="../../../../../com/qualcomm/robotcore/eventloop/opmode/OpModeManagerImpl.OpModeState.html" title="enum in com.qualcomm.robotcore.eventloop.opmode"><span class="strong">OpModeManagerImpl.OpModeState</span></a></li>
117117
</ul>
118118
</li>
119119
</ul>

0 commit comments

Comments
 (0)