Commit 6f1ab5dd authored by Skye Yu's avatar Skye Yu

feat: add version limit

parent 54ec7b5e
......@@ -551,7 +551,8 @@ Jensen.prototype.factoryReset = async function (seconds) {
return this.send(new Command(FACTORY_RESET), seconds);
};
Jensen.prototype.restoreFactorySettings = async function (seconds) {
// if (this.versionNumber < 393230) return null;
if (this.model === 'hidock-h1e' && this.versionNumber < 393476) return null;
if (this.model === 'hidock-h1' && this.versionNumber < 327944) return null;
return this.send(new Command(RESTORE_FACTORY_SETTINGS).body([0x01, 0x02, 0x03, 0x04]), seconds);
};
Jensen.prototype.listFiles = async function () {
......@@ -758,6 +759,8 @@ Jensen.prototype.setNotification = function (enable, seconds) {
return this.send(new Command(SET_SETTINGS).body([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, enable ? 1 : 2]), seconds);
};
Jensen.prototype.setBluetoothPromptPlay = function(enable, seconds) {
if (this.model === 'hidock-h1e' && this.versionNumber < 393218) return { result: false }
if (this.model === 'hidock-h1' && this.versionNumber < 327732) return { result: false }
return this.send(new Command(SET_SETTINGS).body([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, enable ? 1 : 2]), 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