diff --git a/src/Components/MainContent/style.scss b/src/Components/MainContent/style.scss
index cf819ee33..6f150c09e 100644
--- a/src/Components/MainContent/style.scss
+++ b/src/Components/MainContent/style.scss
@@ -10,22 +10,6 @@
-webkit-transform: rotateX(0deg); /* DO NOT REMOVE! this fixes the UI freezing bug on MAC OS X */
transition: all 0.3s;
- .note {
- margin-bottom: 20px;
- background-color: #fff7cd;
- border: 1px solid #ffe55f;
- margin-top: 5px;
- margin-bottom: 25px;
- border-radius: 3px;
- font-size: 11px;
- font-family: 'open_sansregular', Arial;
- padding: 5px 7px 5px 7px;
-
- @media screen and (max-width: 768px) {
- margin-bottom: 18px;
- }
- }
-
.note.alert {
background-color: #bc544b;
border: 1px solid #ff0000;
@@ -62,7 +46,6 @@
}
.gui-box {
- margin-bottom: 10px;
font-weight: bold;
font-family: 'open_sanssemibold', Arial;
background-color: #FFFFFF;
diff --git a/src/Components/MotorControl/index.jsx b/src/Components/MotorControl/index.jsx
index 07f135491..5340a8ecb 100644
--- a/src/Components/MotorControl/index.jsx
+++ b/src/Components/MotorControl/index.jsx
@@ -1,23 +1,18 @@
-import Slider, { createSliderWithTooltip } from 'rc-slider';
import { useTranslation } from 'react-i18next';
import PropTypes from 'prop-types';
import React, {
useState,
useMemo,
} from 'react';
-import 'rc-slider/assets/index.css';
import Box from '@mui/material/Box';
import Grid from '@mui/material/Grid';
import MuiSlider from '@mui/material/Slider';
import Typography from '@mui/material/Typography';
-import Checkbox from '../Input/Checkbox';
import { useInterval } from '../../utils/helpers/React';
-
-import './style.scss';
-
-const SliderWithTooltip = createSliderWithTooltip(Slider);
+import Checkbox from '../Input/Checkbox';
+import Warning from '../Warning';
function BatteryState({ getBatteryState }) {
const { t } = useTranslation('common');
@@ -189,67 +184,86 @@ function MotorControl({
), [unlock]);
return (
-
-
-
-
- {t('motorControl')}
-
-
-
-
-
- {t('motorControlText-1')}
-
-
-
- {t('motorControlText-2')}
-
-
-
- {t('motorControlText-3')}
-
-
-
-
-
-
+
+
+
+
+
+ {t('motorControl')}
+
-
-
- {singleSliderElements}
-
+
+ {t('motorControlText-1')}
+
+
+
+ {t('motorControlText-2')}
+
+
+
+ {t('motorControlText-3')}
+
+
+
+
+
+
+
+
+
-
- {t('masterSpeed')}
-
-
- {memoizedMasterSlider}
+
+ {singleSliderElements}
+
+
+
+
+ {t('masterSpeed')}
+
+
+ {memoizedMasterSlider}
+
-
-
-
-
+
+
+
+
+
+
+
+
);
}
MotorControl.defaultProps = {
diff --git a/src/Components/MotorControl/style.scss b/src/Components/MotorControl/style.scss
deleted file mode 100644
index 173a30db2..000000000
--- a/src/Components/MotorControl/style.scss
+++ /dev/null
@@ -1,113 +0,0 @@
-#motor-control-wrapper {
- max-width: 600px;
- width: 100%;
-
- .gui-box {
-
- .line-wrapper {
- display: flex;
- align-items: center;
- margin-bottom: 3px;
-
- &>* {
- flex: 1;
- padding: 0px;
- margin-bottom: 7px;
- }
-
- .battery-state {
- font-weight: bold;
-
- &.danger {
- font-weight: bold;
- color: red;
- }
- }
- }
- }
-
- .rc-slider {
- margin-left: 8px;
- height: 30px;
- }
-
- .rc-slider-tooltip {
- .rc-slider-tooltip-content {
- margin-bottom: -15px;
- }
-
- .rc-slider-tooltip-arrow {
- display: none;
- }
- .rc-slider-tooltip-inner {
- background-color: transparent;
- color: black;
- font-weight: normal;
- box-shadow: none;
- }
- }
-
- .rc-slider-track {
- background: var(--color-primary);
- }
-
- .rc-slider-handle {
- margin-top: -7px;
- width: 19px;
- height: 19px;
- border: 0px;
- background: var(--color-primary);
- }
-
- .rc-slider-disabled {
- background: transparent;
-
- .rc-slider-handle {
- background: #cccccc;
- }
- }
-
- .checkbox label {
- flex: 0 0 10px !important;
- }
-
- #slider-wrapper {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
-
- #single-slider,
- #master-slider {
- flex: 1;
- margin-right: 30px;
- }
-
- .slider,
- #master-slider {
- h3 {
- padding-bottom: 20px;
- }
-
- .input-range {
- float: none;
- margin-left: 8px;
- }
- }
-
- @media only screen and (max-width: 600px) {
- flex-direction: column-reverse;
- align-items: flex-start;
-
- #single-slider,
- #master-slider {
- width: 90%;
- }
-
- .slider {
- h3 {
- padding-top: 10px;
- }
- }
- }
- }
-}
diff --git a/src/Components/Warning/index.jsx b/src/Components/Warning/index.jsx
new file mode 100644
index 000000000..3fbfbc24e
--- /dev/null
+++ b/src/Components/Warning/index.jsx
@@ -0,0 +1,23 @@
+import { useTranslation } from 'react-i18next';
+import React from 'react';
+
+import Alert from '@mui/material/Alert';
+import AlertTitle from '@mui/material/AlertTitle';
+
+function Warning() {
+ const { t } = useTranslation('common');
+
+ return (
+
+
+ {t('noteTitle')}
+
+
+
+
+
+
+ );
+}
+
+export default Warning;
diff --git a/src/translations/en/common.json b/src/translations/en/common.json
index 0f06c14f3..49a0168a7 100644
--- a/src/translations/en/common.json
+++ b/src/translations/en/common.json
@@ -6,8 +6,9 @@
"serialPermission": "Select Serial Port",
"showLog": "Show Log",
"hideLog": "Hide Log",
- "notePropsOff": "
Note: Make sure you've taken the propellers
OFF before doing anything on this tab.",
- "noteConnectPower": "
Note: Connect power to the ESCs.",
+ "noteTitle": "Warning",
+ "notePropsOff": "Make sure you've taken the propellers
OFF before continuing.",
+ "noteConnectPower": "It might be necessary to connect power to the ESCs.",
"commonParameters": "Common Parameters",
"unsupportedFirmware": "Unsupported Firmware",
"commonSettingsDisabled": "Common settings disabled",
diff --git a/yarn.lock b/yarn.lock
index d05870819..009acb14b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2774,11 +2774,6 @@ atob@^2.1.2:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
-autobind-decorator@^1.3.4:
- version "1.4.3"
- resolved "https://registry.yarnpkg.com/autobind-decorator/-/autobind-decorator-1.4.3.tgz#4c96ffa77b10622ede24f110f5dbbf56691417d1"
- integrity sha1-TJb/p3sQYi7eJPEQ9du/VmkUF9E=
-
autoprefixer@^9.6.1:
version "9.8.6"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.6.tgz#3b73594ca1bf9266320c5acf1588d74dea74210f"
@@ -9434,15 +9429,6 @@ prompts@2.4.0, prompts@^2.0.1:
kleur "^3.0.3"
sisteransi "^1.0.5"
-prop-types@^15.5.8, prop-types@^15.7.2:
- version "15.7.2"
- resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
- integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
- dependencies:
- loose-envify "^1.4.0"
- object-assign "^4.1.1"
- react-is "^16.8.1"
-
prop-types@^15.6.2:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
@@ -9452,6 +9438,15 @@ prop-types@^15.6.2:
object-assign "^4.1.1"
react-is "^16.13.1"
+prop-types@^15.7.2:
+ version "15.7.2"
+ resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
+ integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
+ dependencies:
+ loose-envify "^1.4.0"
+ object-assign "^4.1.1"
+ react-is "^16.8.1"
+
proxy-addr@~2.0.5:
version "2.0.6"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf"
@@ -9763,14 +9758,6 @@ react-i18next@^11.8.8:
"@babel/runtime" "^7.13.6"
html-parse-stringify2 "^2.0.1"
-react-input-range@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/react-input-range/-/react-input-range-1.3.0.tgz#f96d001631ab817417f1e26d8f9f9684b4827f59"
- integrity sha1-+W0AFjGrgXQX8eJtj5+WhLSCf1k=
- dependencies:
- autobind-decorator "^1.3.4"
- prop-types "^15.5.8"
-
react-is@^16.12.0, react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.1:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"