diff --git a/index.html b/index.html
index d0d13bf..53ee956 100644
--- a/index.html
+++ b/index.html
@@ -318,7 +318,8 @@
Configure Display (optional)
-
+
+
Rotation
+
+
+
Reconditioning
+
+
+
+
@@ -1764,6 +1776,32 @@
// done
await rnode.close();
+ },
+ async startDisplayReconditioning() {
+
+ // ask for rnode
+ const rnode = await this.askForRNode();
+ if(!rnode){
+ return;
+ }
+
+ // check if device has been provisioned
+ const rom = await rnode.getRomAsObject();
+ const details = rom.parse();
+ if(!details || !details.is_provisioned){
+ alert("Eeprom is not provisioned. You must do this first!");
+ await rnode.close();
+ return;
+ }
+
+ // configure
+ console.log("starting display reconditioning");
+ await rnode.startDisplayReconditioning();
+ console.log("starting display reconditioning: done");
+
+ // done
+ await rnode.close();
+
},
async readAsBinaryString(blob) {
return new Promise((resolve, reject) => {
diff --git a/js/rnode.js b/js/rnode.js
index 1f545fc..dc90cd9 100644
--- a/js/rnode.js
+++ b/js/rnode.js
@@ -80,6 +80,7 @@ class RNode {
CMD_HASHES = 0x60;
CMD_FW_UPD = 0x61;
CMD_DISP_ROT = 0x67;
+ CMD_DISP_RCND = 0x68;
CMD_BT_CTRL = 0x46;
CMD_BT_PIN = 0x62;
@@ -758,6 +759,13 @@ class RNode {
]);
}
+ async startDisplayReconditioning() {
+ await this.sendKissCommand([
+ this.CMD_DISP_RCND,
+ 0x01,
+ ]);
+ }
+
}
class ROM {