From 3e6dd4547d9dc5918b6187f5c1e15e44cfbc9e81 Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Sun, 23 Oct 2022 09:59:54 +0200 Subject: Drop IMU2 function --- _locales/en/messages.json | 3 --- images/icons/sensor_imu2_error.png | Bin 4706 -> 0 bytes images/icons/sensor_imu2_off.png | Bin 6633 -> 0 bytes images/icons/sensor_imu2_on.png | Bin 5570 -> 0 bytes js/fc.js | 3 +-- js/msp/MSPHelper.js | 2 -- js/serial_backend.js | 5 +---- main.css | 21 --------------------- main.html | 3 --- tabs/ports.js | 6 ------ 10 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 images/icons/sensor_imu2_error.png delete mode 100644 images/icons/sensor_imu2_off.png delete mode 100644 images/icons/sensor_imu2_on.png diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 6e1a3039..3d8c802b 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1169,9 +1169,6 @@ "portsFunction_MSP_DISPLAYPORT": { "message": "MSP Displayport" }, - "portsFunction_IMU2": { - "message": "Secondary IMU" - }, "pidTuning_ShowAllPIDs": { "message": "Show all PIDs" }, diff --git a/images/icons/sensor_imu2_error.png b/images/icons/sensor_imu2_error.png deleted file mode 100644 index 3cd8883b..00000000 Binary files a/images/icons/sensor_imu2_error.png and /dev/null differ diff --git a/images/icons/sensor_imu2_off.png b/images/icons/sensor_imu2_off.png deleted file mode 100644 index aede7f67..00000000 Binary files a/images/icons/sensor_imu2_off.png and /dev/null differ diff --git a/images/icons/sensor_imu2_on.png b/images/icons/sensor_imu2_on.png deleted file mode 100644 index 5f26f44a..00000000 Binary files a/images/icons/sensor_imu2_on.png and /dev/null differ diff --git a/js/fc.js b/js/fc.js index 6ddcb693..a9167ae1 100644 --- a/js/fc.js +++ b/js/fc.js @@ -92,8 +92,7 @@ var FC = { gpsHwStatus: 0, rangeHwStatus: 0, speedHwStatus: 0, - flowHwStatus: 0, - imu2HwStatus: 0 + flowHwStatus: 0 }; SENSOR_CONFIG = { diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index ec9b976d..10e67f6b 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -43,7 +43,6 @@ var mspHelper = (function (gui) { 'FRSKY_OSD': 20, 'DJI_FPV': 21, 'SMARTPORT_MASTER': 23, - 'IMU2': 24, 'MSP_DISPLAYPORT': 25, }; @@ -104,7 +103,6 @@ var mspHelper = (function (gui) { SENSOR_STATUS.rangeHwStatus = data.getUint8(6); SENSOR_STATUS.speedHwStatus = data.getUint8(7); SENSOR_STATUS.flowHwStatus = data.getUint8(8); - SENSOR_STATUS.imu2HwStatus = data.getUint8(9); sensor_status_ex(SENSOR_STATUS); break; diff --git a/js/serial_backend.js b/js/serial_backend.js index c6d1220c..bfe21829 100755 --- a/js/serial_backend.js +++ b/js/serial_backend.js @@ -464,7 +464,6 @@ function sensor_status_ex(hw_status) sensor_status_update_icon('.sonar', '.sonaricon', hw_status.rangeHwStatus); sensor_status_update_icon('.airspeed', '.airspeedicon', hw_status.speedHwStatus); sensor_status_update_icon('.opflow', '.opflowicon', hw_status.flowHwStatus); - sensor_status_update_icon('.imu2', '.imu2icon', hw_status.imu2HwStatus); } function sensor_status_update_icon(sensId, sensIconId, status) @@ -499,8 +498,7 @@ function sensor_status_hash(hw_status) hw_status.gpsHwStatus + hw_status.rangeHwStatus + hw_status.speedHwStatus + - hw_status.flowHwStatus + - hw_status.imu2HwStatus; + hw_status.flowHwStatus; } /** @@ -523,7 +521,6 @@ function sensor_status(sensors_detected) { SENSOR_STATUS.rangeHwStatus = have_sensor(sensors_detected, 'sonar') ? 1 : 0; SENSOR_STATUS.speedHwStatus = have_sensor(sensors_detected, 'airspeed') ? 1 : 0; SENSOR_STATUS.flowHwStatus = have_sensor(sensors_detected, 'opflow') ? 1 : 0; - SENSOR_STATUS.imu2HwStatus = have_sensor(sensors_detected, 'imu2') ? 1 : 0; sensor_status_ex(SENSOR_STATUS); } diff --git a/main.css b/main.css index f2e47013..f7fb60c4 100644 --- a/main.css +++ b/main.css @@ -322,27 +322,6 @@ input[type="number"]::-webkit-inner-spin-button { color: #d40000; } -.imu2icon { - background: url("../images/icons/sensor_imu2_off.png") no-repeat -5px 2px; - background-size: 40px; - height: 30px; - margin-top: 3px; - width: 100%; - padding-top: 40px; - color: #4f4f4f; - text-align: center; -} - -.imu2icon.active { - background-image: url("../images/icons/sensor_imu2_on.png"); - color: #818181; -} - -.imu2icon.error { - background-image: url("../images/icons/sensor_imu2_error.png"); - color: #d40000; -} - .magicon { background: url("../images/icons/sensor_mag_off.png") no-repeat -5px 2px; background-size: 42px; diff --git a/main.html b/main.html index 71da7b46..04035010 100755 --- a/main.html +++ b/main.html @@ -138,9 +138,6 @@
  • Speed
  • -
  • -
    IMU2
    -
  • diff --git a/tabs/ports.js b/tabs/ports.js index b17966f4..37a9dbec 100644 --- a/tabs/ports.js +++ b/tabs/ports.js @@ -105,12 +105,6 @@ TABS.ports.initialize = function (callback) { maxPorts: 1 } ); - functionRules.push({ - name: 'IMU2', - groups: ['peripherals'], - maxPorts: 1 } - ); - for (var i = 0; i < functionRules.length; i++) { functionRules[i].displayName = chrome.i18n.getMessage('portsFunction_' + functionRules[i].name); } -- cgit v1.2.3