diff options
author | Pawel Spychalski (DzikuVx) <pspychalski@gmail.com> | 2019-07-16 20:37:41 +0300 |
---|---|---|
committer | Pawel Spychalski (DzikuVx) <pspychalski@gmail.com> | 2019-07-16 20:37:41 +0300 |
commit | 9433319fdfa24b1c3a8c2e791d1e8abde6057590 (patch) | |
tree | 8801eaf3ee5690f2c2f6203d1cce281135544dc5 /tabs | |
parent | cc80e0772684ae54e38bc0bc62a202f0bfd4df07 (diff) |
Motors tab refactoring
Diffstat (limited to 'tabs')
-rw-r--r-- | tabs/motors.html | 51 | ||||
-rw-r--r-- | tabs/motors.js | 8 |
2 files changed, 39 insertions, 20 deletions
diff --git a/tabs/motors.html b/tabs/motors.html index 47cb9978..f01850b4 100644 --- a/tabs/motors.html +++ b/tabs/motors.html @@ -62,25 +62,17 @@ </div> <div class="gui_box motorblock"> <div class="spacer"> + <div class="title2">Motors</div> <div class="left motors"> - <div class="title2">Motors</div> + <ul class="titles motor-titles"> </ul> <div class="bar-wrapper"></div> </div> - <div class="right servos"> - <div class="title2">Servos</div> - <ul class="titles"> - <li title="Servo - 8">8</li> - <li title="Servo - 7">7</li> - <li title="Servo - 6">6</li> - <li title="Servo - 5">5</li> - <li title="Servo - 4">4</li> - <li title="Servo - 3">3</li> - <li title="Servo - 2">2</li> - <li title="Servo - 1">1</li> - </ul> - <div class="bar-wrapper"></div> + <div class="motor_testing_notice"> + <p i18n="motorsNotice"></p> + <label><input id="motorsEnableTestMode" type="checkbox" class="togglesmall"/><span + class="motorsEnableTestMode" i18n="motorsEnableControl"></span></label> </div> <div class="clear-both"></div> <div class="motor_testing"> @@ -94,14 +86,35 @@ </ul> </div> </div> - <div class="notice"> - <p i18n="motorsNotice"></p> - <label><input id="motorsEnableTestMode" type="checkbox" class="togglesmall"/><span - class="motorsEnableTestMode" i18n="motorsEnableControl"></span></label> - </div> <div class="cler-both"></div> </div> </div> </div> + <div class="gui_box motorblock"> + <div class="spacer" style="padding-left: 0"> + <div class="title2">Servos</div> + <div class="servos"> + <ul class="titles"> + <li title="Servo - 8">15</li> + <li title="Servo - 7">14</li> + <li title="Servo - 6">13</li> + <li title="Servo - 5">12</li> + <li title="Servo - 4">11</li> + <li title="Servo - 3">10</li> + <li title="Servo - 2">9</li> + <li title="Servo - 1">8</li> + <li title="Servo - 8">7</li> + <li title="Servo - 7">6</li> + <li title="Servo - 6">5</li> + <li title="Servo - 5">4</li> + <li title="Servo - 4">3</li> + <li title="Servo - 3">2</li> + <li title="Servo - 2">1</li> + <li title="Servo - 1">0</li> + </ul> + <div class="bar-wrapper"></div> + </div> + </div> + </div> </div> </div> diff --git a/tabs/motors.js b/tabs/motors.js index bdf3c4fa..f6994a60 100644 --- a/tabs/motors.js +++ b/tabs/motors.js @@ -340,8 +340,14 @@ TABS.motors.initialize = function (callback) { $motorValues.append('<li style="font-weight: bold" data-i18n="motorsMaster"></li>'); for (let i = 0; i < SERVO_RULES.getServoCount(); i++) { + + let opacity = ""; + if (!SERVO_RULES.isServoConfigured(15 - i)) { + opacity = ' style="opacity: 0.2"'; + } + servos_wrapper.append('\ - <div class="m-block servo-' + (7 - i) + '">\ + <div class="m-block servo-' + (15 - i) + '" ' + opacity + '>\ <div class="meter-bar">\ <div class="label"></div>\ <div class="indicator">\ |