Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
Changes for release v2.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
ftctechnh committed Nov 13, 2016
1 parent 295a9e4 commit d74a01c
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 13 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
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.
Binary file modified libs/Blocks-release-sources.jar
Binary file not shown.
Binary file modified libs/Blocks-release.aar
Binary file not shown.
Binary file modified libs/FtcCommon-release-sources.jar
Binary file not shown.
Binary file modified libs/FtcCommon-release.aar
Binary file not shown.
Binary file modified libs/Hardware-release-sources.jar
Binary file not shown.
Binary file modified libs/Hardware-release.aar
Binary file not shown.
Binary file modified libs/Inspection-release.aar
Binary file not shown.
Binary file modified libs/RobotCore-release-sources.jar
Binary file not shown.
Binary file modified libs/RobotCore-release.aar
Binary file not shown.

0 comments on commit d74a01c

Please sign in to comment.