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

Commit

Permalink
Merge branch 'beta' (release v2.4) into master branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
ftctechnh committed Dec 17, 2016
2 parents 5c9165d + 144efa0 commit a337d81
Show file tree
Hide file tree
Showing 24 changed files with 148 additions and 149 deletions.
4 changes: 2 additions & 2 deletions FtcRobotController/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.qualcomm.ftcrobotcontroller"
android:versionCode="14"
android:versionName="2.35">
android:versionCode="15"
android:versionName="2.4">

<application
android:allowBackup="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ public class TemplateOpMode_Iterative extends OpMode
{
/* Declare OpMode members. */
private ElapsedTime runtime = new ElapsedTime();

// private DcMotor leftMotor = null;
// private DcMotor rightMotor = null;
private DcMotor leftMotor = null;
private DcMotor rightMotor = null;

/*
* Code to run ONCE when the driver hits INIT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public class TemplateOpMode_Linear extends LinearOpMode {

/* Declare OpMode members. */
private ElapsedTime runtime = new ElapsedTime();
// DcMotor leftMotor = null;
// DcMotor rightMotor = null;
DcMotor leftMotor = null;
DcMotor rightMotor = null;

@Override
public void runOpMode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbManager;
import android.net.wifi.WifiManager;
Expand Down Expand Up @@ -255,6 +257,7 @@ public void onClick(View v) {

wifiLock.acquire();
callback.networkConnectionUpdate(WifiDirectAssistant.Event.DISCONNECTED);
readNetworkType(NETWORK_TYPE_FILENAME);
bindToService();
}

Expand Down Expand Up @@ -295,7 +298,6 @@ public boolean onTouch(View v, MotionEvent event) {
protected void onResume() {
super.onResume();
RobotLog.vv(TAG, "onResume()");
readNetworkType(NETWORK_TYPE_FILENAME);
}

@Override
Expand Down Expand Up @@ -361,6 +363,12 @@ protected void readNetworkType(String fileName) {
String fileContents = readFile(networkTypeFile);
networkType = NetworkConnectionFactory.getTypeFromString(fileContents);
programmingModeController.setCurrentNetworkType(networkType);

// update the preferences
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = preferences.edit();
editor.putString(NetworkConnectionFactory.NETWORK_CONNECTION_TYPE, networkType.toString());
editor.commit();
}

private String readFile(File file) {
Expand Down Expand Up @@ -488,7 +496,13 @@ private void requestRobotSetup() {
HardwareFactory factory;
RobotConfigFile file = cfgFileMgr.getActiveConfigAndUpdateUI();
HardwareFactory hardwareFactory = new HardwareFactory(context);
hardwareFactory.setXmlPullParser(file.getXml());
try {
hardwareFactory.setXmlPullParser(file.getXml());
} catch (Resources.NotFoundException e) {
file = RobotConfigFile.noConfig(cfgFileMgr);
hardwareFactory.setXmlPullParser(file.getXml());
cfgFileMgr.setActiveConfigAndUpdateUI(false, file);
}
factory = hardwareFactory;

eventLoop = new FtcEventLoop(factory, createOpModeRegister(), callback, this, programmingModeController);
Expand Down
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,42 @@ For technical questions regarding the SDK, please visit the FTC Technology forum

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


**************************************************************************************

Version 2.4 (released on 16.11.13)
* Fix to avoid crashing for nonexistent resources.
* Blocks Programming mode changes:
- Added blocks to support OpenGLMatrix, MatrixF, and VectorF.
- Added blocks to support AngleUnit, AxesOrder, AxesReference, CameraDirection, CameraMonitorFeedback, DistanceUnit, and TempUnit.
- Added blocks to support Acceleration.
- Added blocks to support LinearOpMode.getRuntime.
- Added blocks to support MagneticFlux and Position.
- Fixed typos.
- Made blocks for ElapsedTime more consistent with other objects.
- Added blocks to support Quaternion, Velocity, Orientation, AngularVelocity.
- Added blocks to support VuforiaTrackables, VuforiaTrackable, VuforiaLocalizer, VuforiaTrackableDefaultListener.
- Fixed a few blocks.
- Added type checking to new blocks.
- Updated to latest blockly.
- Added default variable blocks to navigation and matrix blocks.
- Fixed toolbox entry for openGLMatrix_rotation_withAxesArgs.
- When user downloads Blocks-generated op mode, only the .blk file is downloaded.
- When user uploads Blocks-generated op mode (.blk file), Javascript code is auto generated.
- Added DbgLog support.
- Added logging when a blocks file is read/written.
- Fixed bug to properly render blocks even if missing devices from configuration file.
- Added support for additional characters (not just alphanumeric) for the block file names (for download and upload).
- Added support for OpMode flavor (“Autonomous” or “TeleOp”) and group.
* Changes to Samples to prevent tutorial issues.
* Incorporated suggested changes from public pull 216 (“Replace .. paths”).
* Remove Servo Glitches when robot stopped.
* if user hits “Cancels” when editing a configuration file, clears the unsaved changes and reverts to original unmodified configuration.
* Added log info to help diagnose why the Robot Controller app was terminated (for example, by watch dog function).
* Added ability to transfer log from the controller.
* Fixed inconsistency for AngularVelocity
* 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.

**************************************************************************************

Version 2.35 (released on 16.10.06)
Expand Down
8 changes: 4 additions & 4 deletions build.common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ android {
debug {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile file('../libs/ftc.debug.keystore')
storeFile rootProject.file('libs/ftc.debug.keystore')
storePassword 'android'
}
}
Expand All @@ -50,7 +50,7 @@ android {
* @see <a href="http://developer.android.com/tools/building/configuring-gradle.html">Configure Your Build</a>
* @see <a href="http://developer.android.com/tools/publishing/versioning.html">Versioning Your App</a>
*/
def manifestFile = file('../FtcRobotController/src/main/AndroidManifest.xml');
def manifestFile = project(':FtcRobotController').file('src/main/AndroidManifest.xml');
def manifestText = manifestFile.getText()
//
def vCodePattern = Pattern.compile("versionCode=\"(\\d+(\\.\\d+)*)\"")
Expand Down Expand Up @@ -91,13 +91,13 @@ android {

sourceSets.main {
jni.srcDirs = []
jniLibs.srcDir "../libs"
jniLibs.srcDir rootProject.file('libs')
}
}

repositories {
flatDir {
dirs '../libs'
dirs rootProject.file('libs')
}
}

Expand Down
Binary file modified doc/apk/FtcDriverStation-release.apk
Binary file not shown.
Binary file modified doc/apk/FtcRobotController-release.apk
Binary file not shown.
10 changes: 5 additions & 5 deletions doc/javadoc/com/qualcomm/ftccommon/package-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,27 @@ <h2 title="Class Hierarchy">Class Hierarchy</h2>
</li>
<li type="circle">Activity
<ul>
<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>
<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>
</ul>
</li>
<li type="circle">Activity
<ul>
<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>
<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>
</ul>
</li>
<li type="circle">Activity
<ul>
<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>
<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>
</ul>
</li>
<li type="circle">Activity
<ul>
<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>
<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>
</ul>
</li>
<li type="circle">Activity
<ul>
<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>
<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>
</ul>
</li>
<li type="circle">Binder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ <h2 title="Interface Hierarchy">Interface Hierarchy</h2>
</ul>
<h2 title="Annotation Type Hierarchy">Annotation Type Hierarchy</h2>
<ul>
<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>
<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>
<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>
<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>
<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>
</ul>
<h2 title="Enum Hierarchy">Enum Hierarchy</h2>
<ul>
<li type="circle">java.lang.Object
<ul>
<li type="circle">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T&gt;, java.io.Serializable)
<ul>
<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>
<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>
<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>
</ul>
</li>
</ul>
Expand Down
14 changes: 7 additions & 7 deletions doc/javadoc/com/qualcomm/robotcore/hardware/package-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,20 +224,20 @@ <h2 title="Enum Hierarchy">Enum Hierarchy</h2>
<ul>
<li type="circle">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T&gt;, java.io.Serializable)
<ul>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.WRITE_CACHE_STATUS.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">I2cDeviceSynchImpl.WRITE_CACHE_STATUS</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/DcMotorSimple.Direction.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">DcMotorSimple.Direction</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/Servo.Direction.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">Servo.Direction</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/IrSeekerSensor.Mode.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">IrSeekerSensor.Mode</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.WRITE_CACHE_STATUS.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">I2cDeviceSynchImpl.WRITE_CACHE_STATUS</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/CompassSensor.CompassMode.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">CompassSensor.CompassMode</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/ServoController.PwmStatus.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">ServoController.PwmStatus</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/DigitalChannelController.Mode.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">DigitalChannelController.Mode</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.CONTROLLER_PORT_MODE.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">I2cDeviceSynchImpl.CONTROLLER_PORT_MODE</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/DeviceManager.DeviceType.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">DeviceManager.DeviceType</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/HardwareDevice.Manufacturer.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">HardwareDevice.Manufacturer</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/DcMotor.RunMode.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">DcMotor.RunMode</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/IrSeekerSensor.Mode.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">IrSeekerSensor.Mode</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/DigitalChannelController.Mode.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">DigitalChannelController.Mode</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/DcMotorSimple.Direction.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">DcMotorSimple.Direction</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/DeviceManager.DeviceType.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">DeviceManager.DeviceType</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.READ_CACHE_STATUS.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">I2cDeviceSynchImpl.READ_CACHE_STATUS</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/DcMotor.ZeroPowerBehavior.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">DcMotor.ZeroPowerBehavior</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/I2cDeviceSynch.ReadMode.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">I2cDeviceSynch.ReadMode</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/HardwareDevice.Manufacturer.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">HardwareDevice.Manufacturer</span></a></li>
<li type="circle">com.qualcomm.robotcore.hardware.<a href="../../../../com/qualcomm/robotcore/hardware/ServoController.PwmStatus.html" title="enum in com.qualcomm.robotcore.hardware"><span class="strong">ServoController.PwmStatus</span></a></li>
</ul>
</li>
</ul>
Expand Down
Loading

0 comments on commit a337d81

Please sign in to comment.