1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-25 17:25:16 +03:00

Refactor EscDshotDirection to modules (#3209)

This commit is contained in:
Tomas Chmelevskij 2023-01-05 12:36:35 +01:00 committed by GitHub
parent 6d08e45f14
commit 414202867a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 10 deletions

View file

@ -1,5 +1,3 @@
'use strict';
class EscDshotCommandQueue class EscDshotCommandQueue
{ {
constructor (intervalMs) constructor (intervalMs)
@ -65,3 +63,5 @@ class EscDshotCommandQueue
} }
} }
} }
export default EscDshotCommandQueue;

View file

@ -1,4 +1,8 @@
'use strict'; import { i18n } from "../../js/localization.js";
import GUI from "../../js/gui.js";
import semver from "semver";
import EscDshotDirectionMotorDriver from "./EscDshotDirectionMotorDriver.js";
import DshotCommand from "../../js/utils/DshotCommand.js";
class EscDshotDirectionComponent class EscDshotDirectionComponent
{ {
@ -398,3 +402,5 @@ class EscDshotDirectionComponent
} }
} }
export default EscDshotDirectionComponent;

View file

@ -1,4 +1,5 @@
'use strict'; import EscDshotCommandQueue from './EscDshotCommandQueue.js';
import DshotCommand from '../../js/utils/DshotCommand.js';
class EscDshotDirectionMotorDriver class EscDshotDirectionMotorDriver
{ {
@ -153,3 +154,5 @@ class EscDshotDirectionMotorDriver
} }
} }
export default EscDshotDirectionMotorDriver;

View file

@ -3,6 +3,7 @@ import GUI from '../gui';
import { get as getConfig, set as setConfig } from '../ConfigStorage'; import { get as getConfig, set as setConfig } from '../ConfigStorage';
import MotorOutputReorderConfig from "../../components/MotorOutputReordering/MotorOutputReorderingConfig"; import MotorOutputReorderConfig from "../../components/MotorOutputReordering/MotorOutputReorderingConfig";
import MotorOutputReorderComponent from "../../components/MotorOutputReordering/MotorOutputReorderingComponent"; import MotorOutputReorderComponent from "../../components/MotorOutputReordering/MotorOutputReorderingComponent";
import EscDshotDirectionComponent from "../../components/EscDshotDirection/EscDshotDirectionComponent";
const motors = { const motors = {
previousDshotBidir: null, previousDshotBidir: null,

View file

@ -1,5 +1,3 @@
'use strict';
class DshotCommand class DshotCommand
{ {
static get ALL_MOTORS() { return 255; } static get ALL_MOTORS() { return 255; }
@ -38,3 +36,5 @@ DshotCommand.dshotCommandType_e = {
DSHOT_CMD_TYPE_INLINE: 0, // dshot commands sent inline with motor signal (motors must be enabled) DSHOT_CMD_TYPE_INLINE: 0, // dshot commands sent inline with motor signal (motors must be enabled)
DSHOT_CMD_TYPE_BLOCKING: 1, // dshot commands sent in blocking method (motors must be disabled) DSHOT_CMD_TYPE_BLOCKING: 1, // dshot commands sent in blocking method (motors must be disabled)
}; };
export default DshotCommand;

View file

@ -118,10 +118,6 @@
<script type="text/javascript" src="./node_modules/select2/dist/js/select2.min.js"></script> <script type="text/javascript" src="./node_modules/select2/dist/js/select2.min.js"></script>
<script type="text/javascript" src="./node_modules/multiple-select/dist/multiple-select.min.js"></script> <script type="text/javascript" src="./node_modules/multiple-select/dist/multiple-select.min.js"></script>
<script type="text/javascript" src="./js/utils/EscProtocols.js"></script> <script type="text/javascript" src="./js/utils/EscProtocols.js"></script>
<script type="text/javascript" src="./js/utils/DshotCommand.js"></script>
<script type="text/javascript" src="./components/EscDshotDirection/EscDshotDirectionComponent.js"></script>
<script type="text/javascript" src="./components/EscDshotDirection/EscDshotDirectionMotorDriver.js"></script>
<script type="text/javascript" src="./components/EscDshotDirection/EscDshotCommandQueue.js"></script>
<title></title> <title></title>
</head> </head>