Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jensen
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Skye Yu
jensen
Commits
a0588464
Commit
a0588464
authored
Dec 18, 2025
by
martin hou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 增加对Live模式的识别与屏蔽部分轮循指令
parent
758a25b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
jensen.js
src/utils/jensen.js
+11
-1
No files found.
src/utils/jensen.js
View file @
a0588464
import
{
isNullishCoalesce
}
from
'typescript'
;
import
{
Logger
as
internalLogger
,
formatTime
,
shortcutKeys
,
sliceTime
}
from
'./utils'
;
import
md5
from
'js-md5'
;
...
...
@@ -100,6 +101,7 @@ function Jensen(log, conn) {
let
handlers
=
{};
let
pid
=
0
;
let
recvable
=
false
;
let
lastCommand
=
null
;
let
self
=
this
;
this
.
data
=
{};
...
...
@@ -266,6 +268,10 @@ function Jensen(log, conn) {
return
Boolean
(
current
);
}
this
.
isLiveMode
=
function
()
{
return
lastCommand
==
REALTIME_TRANSFER
;
}
this
.
setUSBDevice
=
function
(
dev
)
{
device
=
dev
;
ready
=
false
;
...
...
@@ -322,6 +328,7 @@ function Jensen(log, conn) {
}
await
device
.
transferOut
(
1
,
data
).
catch
((
e
)
=>
crash
(
'sendNext'
,
e
));
if
(
cmd
.
onprogress
)
cmd
.
onprogress
(
1
,
1
);
lastCommand
=
cmd
.
command
;
/*
if (data.byteLength < 1000) await device.transferOut(1, data).catch((e) => crash('sendNext', e));
else
...
...
@@ -769,6 +776,7 @@ Jensen.prototype.disconnectBTDevice = async function (seconds) {
Jensen
.
prototype
.
getBluetoothStatus
=
async
function
(
seconds
)
{
if
(
this
.
model
.
indexOf
(
'hidock-p1'
)
==
-
1
)
return
null
;
if
(
this
.
isLiveMode
())
return
null
;
return
this
.
send
(
new
Command
(
BLUETOOTH_STATUS
),
seconds
);
};
...
...
@@ -1224,6 +1232,7 @@ Jensen.prototype.getSettings = async function (seconds) {
if
((
this
.
model
==
'hidock-h1'
||
this
.
model
==
'hidock-h1e'
)
&&
this
.
versionNumber
<
327714
)
{
return
{
autoRecord
:
false
,
autoPlay
:
false
};
}
if
(
this
.
isLiveMode
())
return
null
;
return
this
.
send
(
new
Command
(
GET_SETTINGS
),
seconds
);
};
...
...
@@ -1262,6 +1271,7 @@ Jensen.prototype.formatCard = function (seconds) {
Jensen
.
prototype
.
getRecordingFile
=
function
(
seconds
)
{
if
((
this
.
model
==
'hidock-h1'
||
this
.
model
==
'hidock-h1e'
)
&&
this
.
versionNumber
<
327733
)
return
null
;
if
(
this
.
isLiveMode
())
return
null
;
return
this
.
send
(
new
Command
(
GET_RECORDING_FILE
),
seconds
);
};
...
...
@@ -1297,7 +1307,7 @@ Jensen.prototype.getFileBlock = async function (filename, length, ondata) {
Jensen
.
prototype
.
getBatteryStatus
=
function
(
seconds
)
{
if
(
this
.
model
!=
'hidock-p1'
)
return
null
;
if
(
this
.
busy
())
if
(
this
.
busy
()
||
this
.
isLiveMode
()
)
{
Logger
.
debug
(
'jensen'
,
'dispatcher'
,
'cancel getBatteryStatus cuz busy'
);
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment