Skip to content

Commit 7614ad3

Browse files
authored
Execute prettier (#4291)
* Execute prettier * Fix some sonar complaints * Add git blame ignore rev
1 parent 8e3e419 commit 7614ad3

File tree

180 files changed

+20863
-18937
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+20863
-18937
lines changed

.git-blame-ignore-revs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This file allows ignoring commits in git blame view on Github.
2+
# For more info, see here:
3+
# https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
4+
5+
# Execute prettier
6+
335719b7b7d90676d76b516f67589a0389adceaa

src/components/EscDshotDirection/EscDshotCommandQueue.js

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,49 @@
1-
import MSP from '../../js/msp.js';
1+
import MSP from "../../js/msp.js";
22

3-
class EscDshotCommandQueue
4-
{
5-
constructor (intervalMs)
6-
{
3+
class EscDshotCommandQueue {
4+
constructor(intervalMs) {
75
this._intervalId = null;
86
this._interval = intervalMs;
97
this._queue = [];
108
this._purging = false;
119
}
1210

13-
pushCommand(command, buffer)
14-
{
11+
pushCommand(command, buffer) {
1512
this._queue.push([command, buffer]);
1613
}
1714

18-
pushPause(milliseconds)
19-
{
15+
pushPause(milliseconds) {
2016
const counter = Math.ceil(milliseconds / this._interval);
2117

2218
for (let i = 0; i < counter; i++) {
2319
this.pushCommand(null, null);
2420
}
2521
}
2622

27-
start()
28-
{
23+
start() {
2924
if (null === this._intervalId) {
30-
this._intervalId = setInterval(
31-
() => { this._checkQueue(); },
32-
this._interval);
25+
this._intervalId = setInterval(() => {
26+
this._checkQueue();
27+
}, this._interval);
3328
}
3429
}
3530

36-
stop()
37-
{
38-
if(null !== this._intervalId) {
31+
stop() {
32+
if (null !== this._intervalId) {
3933
clearInterval(this._intervalId);
4034
this._intervalId = null;
4135
}
4236
}
4337

44-
stopWhenEmpty()
45-
{
38+
stopWhenEmpty() {
4639
this._purging = true;
4740
}
4841

49-
clear()
50-
{
42+
clear() {
5143
this._queue = [];
5244
}
5345

54-
_checkQueue()
55-
{
46+
_checkQueue() {
5647
if (0 !== this._queue.length) {
5748
const command = this._queue.shift();
5849

0 commit comments

Comments
 (0)