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:
parent
6d08e45f14
commit
414202867a
6 changed files with 16 additions and 10 deletions
|
@ -1,5 +1,3 @@
|
|||
'use strict';
|
||||
|
||||
class EscDshotCommandQueue
|
||||
{
|
||||
constructor (intervalMs)
|
||||
|
@ -65,3 +63,5 @@ class EscDshotCommandQueue
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default EscDshotCommandQueue;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
@ -398,3 +402,5 @@ class EscDshotDirectionComponent
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default EscDshotDirectionComponent;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
'use strict';
|
||||
import EscDshotCommandQueue from './EscDshotCommandQueue.js';
|
||||
import DshotCommand from '../../js/utils/DshotCommand.js';
|
||||
|
||||
class EscDshotDirectionMotorDriver
|
||||
{
|
||||
|
@ -153,3 +154,5 @@ class EscDshotDirectionMotorDriver
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default EscDshotDirectionMotorDriver;
|
||||
|
|
|
@ -3,6 +3,7 @@ import GUI from '../gui';
|
|||
import { get as getConfig, set as setConfig } from '../ConfigStorage';
|
||||
import MotorOutputReorderConfig from "../../components/MotorOutputReordering/MotorOutputReorderingConfig";
|
||||
import MotorOutputReorderComponent from "../../components/MotorOutputReordering/MotorOutputReorderingComponent";
|
||||
import EscDshotDirectionComponent from "../../components/EscDshotDirection/EscDshotDirectionComponent";
|
||||
|
||||
const motors = {
|
||||
previousDshotBidir: null,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
'use strict';
|
||||
|
||||
class DshotCommand
|
||||
{
|
||||
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_BLOCKING: 1, // dshot commands sent in blocking method (motors must be disabled)
|
||||
};
|
||||
|
||||
export default DshotCommand;
|
||||
|
|
|
@ -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/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/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>
|
||||
</head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue