1-4-2023 initial upload of article, intended for Troubleshooting section

Westside Robotics
2023-01-04 09:31:13 -08:00
parent a4b2088c0f
commit 543a007f0e

116
DS-app-on-Control-Hub.md Normal file

@ -0,0 +1,116 @@
# Uninstall DS app from Control Hub
## Introduction
The following red mark isn't the **<i>very</i>** worst thing to discover at an FTC tournament... but it may quicken your pulse!
<p align="center">[[/images/DS-app-on-Control-Hub/010-Self-Inspect-fail.png]]
The Driver Station app is **not allowed** to be installed on a Robot Controller device, per FTC rule **< RS06 > Driver Station App**.
Uninstalling a DS app from an RC phone is easy, with the on-screen Motorola interface.
But what about a Control Hub? There's no screen!
This article describes one way to uninstall a DS app from a Control Hub.
<i>How did it get there? The most likely scenario was deploying the FTC Driver Station project from Android Studio to a connected Control Hub. **Oops!**</i>
Why does this matter? Besides any technical performance effects, that robot will **fail Field Inspection**, with the Self Inspect screen shown above.
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/DS-app-on-Control-Hub]]</i><p>
## Download `scrcpy`
Here we use a popular open-source tool called `scrcpy` (pronounced "screen copy").
<i>These instructions are for a Windows PC or laptop, but other computers are possible.</i>
Step 1: download the .zip file from [**here**](https://github.com/Genymobile/scrcpy#get-the-app). Just click Windows: **download**.
Step 2: Un-zip or Extract that .zip file, into a folder of your choice.
That's it! No pre-installation is needed.
<i>Optional: place the `scrcpy` shortcut (icon) on your computer's desktop. You will want this again! Right-click the filename `scrcpy.exe`, choose "Send to..." and "Desktop (create shortcut)".</i>
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/DS-app-on-Control-Hub]]</i><p>
## Connect to Control Hub
Now connect that computer to the USB-C port of the (powered-on) Control Hub. Use the short orange USB-C cable from REV Robotics, or any longer USB-C (data) cable.
The computer will automatically recognize the Control Hub, usually indicated by a series of Windows pop-ups, or you can verify with Windows Explorer. (This exercise does not use the REV Hardware Client.)
Click to run the file **`scrcpy.exe`**, or click its icon at the computer's Desktop.
This will open the Command Prompt, or command-line window, where a few instructions will run automatically. You don't need to do anything there.
Then a **new window** will display the Control Hub's "screen". If the FTC Robot Controller app is open, click the 3-dots menu and Exit.
<p align="center">[[/images/DS-app-on-Control-Hub/040-CH-home-screen.png]]
Say hello to Android 7 on Control Hub! This is the same screen you would see, by plugging a standalone HDMI monitor directly into the Control Hub. That's an alternate to using `scrcpy`.
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/DS-app-on-Control-Hub]]</i><p>
## Uninstall DS App
You will use the computer's mouse or touchpad, noting that a right-click generally serves as an Android "Back" arrow.
Click the **Settings** icon at lower left, then click **Apps**.
<p align="center">[[/images/DS-app-on-Control-Hub/050-CH-Settings.png]]
Click on **FTC Driver Station**, the app to be uninstalled.
<p align="center">[[/images/DS-app-on-Control-Hub/060-CH-Apps.png]]
Click **Uninstall**.
<p align="center">[[/images/DS-app-on-Control-Hub/070-CH-DS.png]]
At this Uninstall screen, press **Enter** on the keyboard, don't use a mouse click.
<p align="center">[[/images/DS-app-on-Control-Hub/080-CH-DS-uninstall.png]]
Confirm your choice.
<p align="center">[[/images/DS-app-on-Control-Hub/090-CH-DS-uninstall-confirm.png]]
Done!
Right-click anywhere a few times (acts as Back button) to return to the Control Hub's home screen.
Double-click the FTC Robot Controller icon to open the RC app.
At your connected Driver Station device, close and re-open the Self Inspect screen:
<p align="center">[[/images/DS-app-on-Control-Hub/100-Self-Inspect-pass.png]]
**Mission accomplished!**
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/DS-app-on-Control-Hub]]</i><p>
## Close and Unplug
To close the "screen copy", simply click the small **X** at the extreme top right corner. Unplug the Control Hub's USB-C cable from the computer.
As a bonus, you now have a new way to present and share your Driver Station screen or any other Android content -- on a large monitor, an overhead projector, and even over Zoom! Also handy for screenshots and capturing video.
Documentation for `scrcpy` is [**here**](https://github.com/Genymobile/scrcpy/blob/master/README.md). Don't forget to enable [**USB debugging**](https://developer.android.com/studio/command-line/adb#Enabling), already done for FTC devices.
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/DS-app-on-Control-Hub]]</i><p>
<i>Questions, comments and corrections to westsiderobotics@verizon.net</i>
.
<!--
This text does not appear at the published wiki.
This article was inspired by Phil Malone, who reported in December 2022 that "his team" had this happen at a tournament. Hmm...
-->