Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkyStone v5.3 #7

Merged
merged 1 commit into from
Oct 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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="34"
android:versionName="5.2">
android:versionCode="35"
android:versionName="5.3">

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import android.widget.PopupMenu;
import android.widget.TextView;

import com.google.blocks.ftcrobotcontroller.BlocksActivity;
import com.google.blocks.ftcrobotcontroller.ProgrammingModeActivity;
import com.google.blocks.ftcrobotcontroller.ProgrammingModeControllerImpl;
import com.google.blocks.ftcrobotcontroller.ProgrammingWebHandlers;
import com.google.blocks.ftcrobotcontroller.runtime.BlocksOpMode;
import com.qualcomm.ftccommon.ClassManagerFactory;
Expand All @@ -74,7 +71,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import com.qualcomm.ftccommon.FtcRobotControllerSettingsActivity;
import com.qualcomm.ftccommon.LaunchActivityConstantsList;
import com.qualcomm.ftccommon.LaunchActivityConstantsList.RequestCode;
import com.qualcomm.ftccommon.ProgrammingModeController;
import com.qualcomm.ftccommon.Restarter;
import com.qualcomm.ftccommon.UpdateUI;
import com.qualcomm.ftccommon.configuration.EditParameters;
Expand Down Expand Up @@ -117,7 +113,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import org.firstinspires.ftc.robotcore.internal.system.Assert;
import org.firstinspires.ftc.robotcore.internal.system.PreferencesHelper;
import org.firstinspires.ftc.robotcore.internal.system.ServiceController;
import org.firstinspires.ftc.robotcore.internal.ui.LocalByRefIntentExtraHolder;
import org.firstinspires.ftc.robotcore.internal.ui.ThemedActivity;
import org.firstinspires.ftc.robotcore.internal.ui.UILocation;
import org.firstinspires.ftc.robotcore.internal.webserver.RobotControllerWebInfo;
Expand All @@ -140,7 +135,6 @@ public class FtcRobotControllerActivity extends Activity
protected RobotConfigFileManager cfgFileMgr;

protected ProgrammingModeManager programmingModeManager;
protected ProgrammingModeController programmingModeController;

protected UpdateUI.Callback callback;
protected Context context;
Expand Down Expand Up @@ -362,8 +356,6 @@ public boolean onMenuItemClick(MenuItem item) {
programmingModeManager = new ProgrammingModeManager();
programmingModeManager.register(new ProgrammingWebHandlers());
programmingModeManager.register(new OnBotJavaProgrammingMode());
programmingModeController = new ProgrammingModeControllerImpl(
this, (TextView) findViewById(R.id.textRemoteProgrammingMode), programmingModeManager);

updateUI = createUpdateUI();
callback = createUICallback(updateUI);
Expand Down Expand Up @@ -439,9 +431,6 @@ protected void onResume() {
protected void onPause() {
super.onPause();
RobotLog.vv(TAG, "onPause()");
if (programmingModeController.isActive()) {
programmingModeController.stopProgrammingMode();
}
}

@Override
Expand Down Expand Up @@ -569,20 +558,7 @@ private boolean isRobotRunning() {
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();

if (id == R.id.action_programming_mode) {
if (cfgFileMgr.getActiveConfig().isNoConfig()) {
// Tell the user they must configure the robot before starting programming mode.
// TODO: as we are no longer truly 'modal' this warning should be adapted
AppUtil.getInstance().showToast(UILocation.BOTH, context.getString(R.string.toastConfigureRobotBeforeProgrammingMode));
} else {
Intent programmingModeIntent = new Intent(AppUtil.getDefContext(), ProgrammingModeActivity.class);
programmingModeIntent.putExtra(
LaunchActivityConstantsList.PROGRAMMING_MODE_ACTIVITY_PROGRAMMING_WEB_HANDLERS,
new LocalByRefIntentExtraHolder(programmingModeManager));
startActivity(programmingModeIntent);
}
return true;
} else if (id == R.id.action_program_and_manage) {
if (id == R.id.action_program_and_manage) {
if (isRobotRunning()) {
Intent programmingModeIntent = new Intent(AppUtil.getDefContext(), ProgramAndManageActivity.class);
RobotControllerWebInfo webInfo = programmingModeManager.getWebServer().getConnectionInformation();
Expand All @@ -595,13 +571,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
Intent inspectionModeIntent = new Intent(AppUtil.getDefContext(), RcInspectionActivity.class);
startActivity(inspectionModeIntent);
return true;
}
else if (id == R.id.action_blocks) {
Intent blocksIntent = new Intent(AppUtil.getDefContext(), BlocksActivity.class);
startActivity(blocksIntent);
return true;
}
else if (id == R.id.action_restart_robot) {
} else if (id == R.id.action_restart_robot) {
dimmer.handleDimTimer();
AppUtil.getInstance().showToast(UILocation.BOTH, context.getString(R.string.toastRestartingRobot));
requestRobotRestart();
Expand Down Expand Up @@ -726,8 +696,8 @@ private void requestRobotSetup(@Nullable Runnable runOnComplete) {
}

OpModeRegister userOpModeRegister = createOpModeRegister();
eventLoop = new FtcEventLoop(hardwareFactory, userOpModeRegister, callback, this, programmingModeController);
FtcEventLoopIdle idleLoop = new FtcEventLoopIdle(hardwareFactory, userOpModeRegister, callback, this, programmingModeController);
eventLoop = new FtcEventLoop(hardwareFactory, userOpModeRegister, callback, this);
FtcEventLoopIdle idleLoop = new FtcEventLoopIdle(hardwareFactory, userOpModeRegister, callback, this);

controllerService.setCallback(callback);
controllerService.setupRobot(eventLoop, idleLoop, runOnComplete);
Expand Down
13 changes: 0 additions & 13 deletions FtcRobotController/src/main/res/layout/activity_ftc_controller.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
android:visibility="invisible"
android:text="" />

<!-- invisible except when programming mode is activated from the DS -->
<TextView
android:id="@+id/textRemoteProgrammingMode"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/backgroundLight"
android:gravity="center"
android:textColor="?attr/textWhite"
android:textSize="40sp"
android:textStyle="bold"
android:visibility="invisible"
android:text="" />

</RelativeLayout>

<WebView
Expand Down
14 changes: 0 additions & 14 deletions FtcRobotController/src/main/res/menu/ftc_robot_controller.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
android:showAsAction="never"
android:title="@string/configure_robot_menu_item"/>

<item
android:id="@+id/action_blocks"
android:orderInCategory="400"
android:showAsAction="never"
android:visible="false"
android:title="@string/blocks_menu_item"/>

<item
android:id="@+id/action_programming_mode"
android:orderInCategory="500"
android:showAsAction="never"
android:visible="false"
android:title="@string/programming_mode_menu_item"/>

<item
android:id="@+id/action_program_and_manage"
android:orderInCategory="550"
Expand Down
4 changes: 1 addition & 3 deletions FtcRobotController/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

<!-- Menu -->
<string name="inspection_mode_menu_item">Self Inspect</string>
<string name="programming_mode_menu_item">Programming Mode</string>
<string name="program_and_manage_menu_item">Program &amp; Manage</string>
<string name="blocks_menu_item">Blocks</string>
<string name="settings_menu_item">Settings</string>
Expand All @@ -54,8 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<!-- Toast messages -->
<string name="toastWifiConfigurationComplete">Configuration Complete</string>
<string name="toastRestartingRobot">Restarting Robot</string>
<string name="toastConfigureRobotBeforeProgrammingMode">You must Configure Robot before starting Programming Mode.</string>
<string name="toastWifiUpBeforeProgrammingMode">The Robot Controller must be fully up and running before starting Programming Mode. Is Wifi turned on in settings?</string>
<string name="toastWifiUpBeforeProgrammingMode">The Robot Controller must be fully up and running before entering Program and Manage Mode.</string>

<!-- for interpreting pref_app_theme contents. may be override in merged resources -->
<integer-array name="app_theme_ids">
Expand Down
4 changes: 2 additions & 2 deletions build.common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ android {
// Disable debugging for release versions so it can be uploaded to Google Play.
//debuggable true
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
abiFilters "armeabi-v7a"
}
}
debug {
debuggable true
jniDebuggable true
renderscriptDebuggable true
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
abiFilters "armeabi-v7a"
}
}
}
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.
1 change: 0 additions & 1 deletion doc/javadoc/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ <h1 class="bar">All&nbsp;Classes</h1>
<li><a href="com/qualcomm/robotcore/hardware/PIDFCoefficients.html" title="class in com.qualcomm.robotcore.hardware" target="classFrame">PIDFCoefficients</a></li>
<li><a href="org/firstinspires/ftc/robotcore/external/navigation/Position.html" title="class in org.firstinspires.ftc.robotcore.external.navigation" target="classFrame">Position</a></li>
<li><a href="org/firstinspires/ftc/robotcore/external/Predicate.html" title="interface in org.firstinspires.ftc.robotcore.external" target="classFrame"><span class="interfaceName">Predicate</span></a></li>
<li><a href="com/qualcomm/ftccommon/ProgrammingModeController.html" title="interface in com.qualcomm.ftccommon" target="classFrame"><span class="interfaceName">ProgrammingModeController</span></a></li>
<li><a href="com/qualcomm/robotcore/hardware/PwmControl.html" title="interface in com.qualcomm.robotcore.hardware" target="classFrame"><span class="interfaceName">PwmControl</span></a></li>
<li><a href="com/qualcomm/robotcore/hardware/PwmControl.PwmRange.html" title="class in com.qualcomm.robotcore.hardware" target="classFrame">PwmControl.PwmRange</a></li>
<li><a href="com/qualcomm/robotcore/hardware/PWMOutput.html" title="interface in com.qualcomm.robotcore.hardware" target="classFrame"><span class="interfaceName">PWMOutput</span></a></li>
Expand Down
1 change: 0 additions & 1 deletion doc/javadoc/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ <h1 class="bar">All&nbsp;Classes</h1>
<li><a href="com/qualcomm/robotcore/hardware/PIDFCoefficients.html" title="class in com.qualcomm.robotcore.hardware">PIDFCoefficients</a></li>
<li><a href="org/firstinspires/ftc/robotcore/external/navigation/Position.html" title="class in org.firstinspires.ftc.robotcore.external.navigation">Position</a></li>
<li><a href="org/firstinspires/ftc/robotcore/external/Predicate.html" title="interface in org.firstinspires.ftc.robotcore.external"><span class="interfaceName">Predicate</span></a></li>
<li><a href="com/qualcomm/ftccommon/ProgrammingModeController.html" title="interface in com.qualcomm.ftccommon"><span class="interfaceName">ProgrammingModeController</span></a></li>
<li><a href="com/qualcomm/robotcore/hardware/PwmControl.html" title="interface in com.qualcomm.robotcore.hardware"><span class="interfaceName">PwmControl</span></a></li>
<li><a href="com/qualcomm/robotcore/hardware/PwmControl.PwmRange.html" title="class in com.qualcomm.robotcore.hardware">PwmControl.PwmRange</a></li>
<li><a href="com/qualcomm/robotcore/hardware/PWMOutput.html" title="interface in com.qualcomm.robotcore.hardware"><span class="interfaceName">PWMOutput</span></a></li>
Expand Down
114 changes: 8 additions & 106 deletions doc/javadoc/com/qualcomm/ftccommon/CommandList.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,6 @@ <h3>Field Summary</h3>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/qualcomm/ftccommon/CommandList.html#CMD_PROGRAMMING_MODE_LOG_NOTIFICATION">CMD_PROGRAMMING_MODE_LOG_NOTIFICATION</a></span></code>
<div class="block">Notification that a message was logged during programming mode (blocks).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/qualcomm/ftccommon/CommandList.html#CMD_PROGRAMMING_MODE_PING_NOTIFICATION">CMD_PROGRAMMING_MODE_PING_NOTIFICATION</a></span></code>
<div class="block">Notification that the programming mode (blocks) server received a ping request.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/qualcomm/ftccommon/CommandList.html#CMD_REQUEST_CONFIGURATION_TEMPLATES">CMD_REQUEST_CONFIGURATION_TEMPLATES</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
Expand Down Expand Up @@ -300,28 +288,14 @@ <h3>Field Summary</h3>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/qualcomm/ftccommon/CommandList.html#CMD_START_DS_PROGRAM_AND_MANAGE">CMD_START_DS_PROGRAM_AND_MANAGE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/qualcomm/ftccommon/CommandList.html#CMD_START_DS_PROGRAM_AND_MANAGE_RESP">CMD_START_DS_PROGRAM_AND_MANAGE_RESP</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/qualcomm/ftccommon/CommandList.html#CMD_START_PROGRAMMING_MODE">CMD_START_PROGRAMMING_MODE</a></span></code>
<div class="block">Command to start programming mode (blocks).</div>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/qualcomm/ftccommon/CommandList.html#CMD_START_DS_PROGRAM_AND_MANAGE">CMD_START_DS_PROGRAM_AND_MANAGE</a></span></code>
<div class="block">Command to start Program and Manage mode.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/qualcomm/ftccommon/CommandList.html#CMD_START_PROGRAMMING_MODE_RESP">CMD_START_PROGRAMMING_MODE_RESP</a></span></code>
<div class="block">Response to a command to start programming mode (blocks).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/qualcomm/ftccommon/CommandList.html#CMD_STOP_PROGRAMMING_MODE">CMD_STOP_PROGRAMMING_MODE</a></span></code>
<div class="block">Command to stop programming mode (blocks).</div>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/qualcomm/ftccommon/CommandList.html#CMD_START_DS_PROGRAM_AND_MANAGE_RESP">CMD_START_DS_PROGRAM_AND_MANAGE_RESP</a></span></code>
<div class="block">Response to a command to start Program and Manage mode.</div>
</td>
</tr>
</table>
Expand Down Expand Up @@ -605,105 +579,33 @@ <h4>CMD_REQUEST_REMEMBERED_GROUPS_RESP</h4>
</dl>
</li>
</ul>
<a name="CMD_START_PROGRAMMING_MODE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CMD_START_PROGRAMMING_MODE</h4>
<pre>public static final&nbsp;java.lang.String CMD_START_PROGRAMMING_MODE</pre>
<div class="block">Command to start programming mode (blocks).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.qualcomm.ftccommon.CommandList.CMD_START_PROGRAMMING_MODE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CMD_START_DS_PROGRAM_AND_MANAGE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CMD_START_DS_PROGRAM_AND_MANAGE</h4>
<pre>public static final&nbsp;java.lang.String CMD_START_DS_PROGRAM_AND_MANAGE</pre>
<div class="block">Command to start Program and Manage mode.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.qualcomm.ftccommon.CommandList.CMD_START_DS_PROGRAM_AND_MANAGE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CMD_START_PROGRAMMING_MODE_RESP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CMD_START_PROGRAMMING_MODE_RESP</h4>
<pre>public static final&nbsp;java.lang.String CMD_START_PROGRAMMING_MODE_RESP</pre>
<div class="block">Response to a command to start programming mode (blocks).

Programming mode connection information will be in extra data.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.qualcomm.ftccommon.CommandList.CMD_START_PROGRAMMING_MODE_RESP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CMD_START_DS_PROGRAM_AND_MANAGE_RESP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CMD_START_DS_PROGRAM_AND_MANAGE_RESP</h4>
<pre>public static final&nbsp;java.lang.String CMD_START_DS_PROGRAM_AND_MANAGE_RESP</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.qualcomm.ftccommon.CommandList.CMD_START_DS_PROGRAM_AND_MANAGE_RESP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CMD_PROGRAMMING_MODE_LOG_NOTIFICATION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CMD_PROGRAMMING_MODE_LOG_NOTIFICATION</h4>
<pre>public static final&nbsp;java.lang.String CMD_PROGRAMMING_MODE_LOG_NOTIFICATION</pre>
<div class="block">Notification that a message was logged during programming mode (blocks).
<div class="block">Response to a command to start Program and Manage mode.

Log message will be in extra data.</div>
Connection information will be in extra data.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.qualcomm.ftccommon.CommandList.CMD_PROGRAMMING_MODE_LOG_NOTIFICATION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CMD_PROGRAMMING_MODE_PING_NOTIFICATION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CMD_PROGRAMMING_MODE_PING_NOTIFICATION</h4>
<pre>public static final&nbsp;java.lang.String CMD_PROGRAMMING_MODE_PING_NOTIFICATION</pre>
<div class="block">Notification that the programming mode (blocks) server received a ping request.

PingDetails (encoded as json) will be in extra data.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.qualcomm.ftccommon.CommandList.CMD_PROGRAMMING_MODE_PING_NOTIFICATION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CMD_STOP_PROGRAMMING_MODE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CMD_STOP_PROGRAMMING_MODE</h4>
<pre>public static final&nbsp;java.lang.String CMD_STOP_PROGRAMMING_MODE</pre>
<div class="block">Command to stop programming mode (blocks).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.qualcomm.ftccommon.CommandList.CMD_STOP_PROGRAMMING_MODE">Constant Field Values</a></dd>
<dd><a href="../../../constant-values.html#com.qualcomm.ftccommon.CommandList.CMD_START_DS_PROGRAM_AND_MANAGE_RESP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
Expand Down
Loading