Commit 79db79f6 authored by martin hou's avatar martin hou

feat: Adjust compatibility according to device models

parent dd288242
...@@ -557,7 +557,7 @@ Jensen.prototype.getFileCount = async function (seconds) { ...@@ -557,7 +557,7 @@ Jensen.prototype.getFileCount = async function (seconds) {
}; };
Jensen.prototype.factoryReset = async function (seconds) { Jensen.prototype.factoryReset = async function (seconds) {
if (this.versionNumber < 327705) return null; if ((this.model == 'hidock-h1' || this.model == 'hidock-h1e') && this.versionNumber < 327705) return null;
return this.send(new Command(FACTORY_RESET), seconds); return this.send(new Command(FACTORY_RESET), seconds);
}; };
...@@ -900,24 +900,24 @@ Jensen.prototype.endBNC = async function (seconds) { ...@@ -900,24 +900,24 @@ Jensen.prototype.endBNC = async function (seconds) {
}; };
Jensen.prototype.getSettings = async function (seconds) { Jensen.prototype.getSettings = async function (seconds) {
if (this.versionNumber < 327714) { if ((this.model == 'hidock-h1' || this.model == 'hidock-h1e') && this.versionNumber < 327714) {
return { autoRecord: false, autoPlay: false }; return { autoRecord: false, autoPlay: false };
} }
return this.send(new Command(GET_SETTINGS), seconds); return this.send(new Command(GET_SETTINGS), seconds);
}; };
Jensen.prototype.setAutoRecord = function (enable, seconds) { Jensen.prototype.setAutoRecord = function (enable, seconds) {
if (this.versionNumber < 327714) return { result: false }; if ((this.model == 'hidock-h1' || this.model == 'hidock-h1e') && this.versionNumber < 327714) return { result: false };
return this.send(new Command(SET_SETTINGS).body([0, 0, 0, enable ? 1 : 2]), seconds); return this.send(new Command(SET_SETTINGS).body([0, 0, 0, enable ? 1 : 2]), seconds);
}; };
Jensen.prototype.setAutoPlay = function (enable, seconds) { Jensen.prototype.setAutoPlay = function (enable, seconds) {
if (this.versionNumber < 327714) return { result: false }; if ((this.model == 'hidock-h1' || this.model == 'hidock-h1e') && this.versionNumber < 327714) return { result: false };
return this.send(new Command(SET_SETTINGS).body([0, 0, 0, 0, 0, 0, 0, enable ? 1 : 2]), seconds); return this.send(new Command(SET_SETTINGS).body([0, 0, 0, 0, 0, 0, 0, enable ? 1 : 2]), seconds);
}; };
Jensen.prototype.setNotification = function (enable, seconds) { Jensen.prototype.setNotification = function (enable, seconds) {
if (this.versionNumber < 327714) return { result: false }; if ((this.model == 'hidock-h1' || this.model == 'hidock-h1e') && this.versionNumber < 327714) return { result: false };
return this.send(new Command(SET_SETTINGS).body([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, enable ? 1 : 2]), seconds); return this.send(new Command(SET_SETTINGS).body([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, enable ? 1 : 2]), seconds);
}; };
...@@ -930,17 +930,17 @@ Jensen.prototype.setBluetoothPromptPlay = function (enable, seconds) { ...@@ -930,17 +930,17 @@ Jensen.prototype.setBluetoothPromptPlay = function (enable, seconds) {
}; };
Jensen.prototype.getCardInfo = function (seconds) { Jensen.prototype.getCardInfo = function (seconds) {
if (this.versionNumber < 327733) return null; if ((this.model == 'hidock-h1' || this.model == 'hidock-h1e') && this.versionNumber < 327733) return null;
return this.send(new Command(READ_CARD_INFO), seconds); return this.send(new Command(READ_CARD_INFO), seconds);
}; };
Jensen.prototype.formatCard = function (seconds) { Jensen.prototype.formatCard = function (seconds) {
if (this.versionNumber < 327733) return null; if ((this.model == 'hidock-h1' || this.model == 'hidock-h1e') && this.versionNumber < 327733) return null;
return this.send(new Command(FORMAT_CARD).body([0x01, 0x02, 0x03, 0x04]), seconds); return this.send(new Command(FORMAT_CARD).body([0x01, 0x02, 0x03, 0x04]), seconds);
}; };
Jensen.prototype.getRecordingFile = function (seconds) { Jensen.prototype.getRecordingFile = function (seconds) {
if (this.versionNumber < 327733) return null; if ((this.model == 'hidock-h1' || this.model == 'hidock-h1e') && this.versionNumber < 327733) return null;
return this.send(new Command(GET_RECORDING_FILE), seconds); return this.send(new Command(GET_RECORDING_FILE), seconds);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment