Skip to content

Commit

Permalink
power by device widgets added
Browse files Browse the repository at this point in the history
  • Loading branch information
charlysoledad committed Apr 5, 2022
1 parent 148adfb commit 246e391
Showing 1 changed file with 76 additions and 9 deletions.
85 changes: 76 additions & 9 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
<script src="directives/stateIndicator.js"></script>
<script src="directives/compass.js"></script>
<script src="directives/colorBall.js"></script>
<script src="directives/barChart.js"></script>
<script src="directives/circleChart.js"></script>

</head>

Expand Down Expand Up @@ -178,7 +180,12 @@ <h1 class="title">Vision and Shooter</h1>
<div class="medbox" layout="row" flex="grow">
<!-- gyro value -->
<div layout="column" flex="grow" layout-align="center center">
<h1 class="title">Robot Gyroscope</h1>
<div layout="row" flex="grow" layout-align="center center">
<h1 class="title">Gyroscope </h1> &nbsp;&nbsp;&nbsp;
<state-indicator value="data.sensors.isGyroCalibrated"
radio="12" width="28" height="28" style="height: 28px;">
</state-indicator>
</div>
<compass value="data.sensors.gyroAngle" width="180" height="180"></compass>
<p class="subTitle">Gyro angle: <span class="value">{{data.sensors.gyroAngle}}</span></p>
</div>
Expand Down Expand Up @@ -208,22 +215,29 @@ <h1 class="title">Autonomous Chooser</h1>
</div>
</div>
<!-- end autonomous selector -->
<!-- test button --
<!-- test button -->
<div layout="row" flex="grow">
<div layout="column" flex="grow">
<div class="medbox2" layout="row" flex="30"
layout-align="center center">
<h1 class="title"></h1>
</div>
<div layout="row" flex="grow" class="" layout-align="center center">
<md-button ng-click="updateA()" class="md-raised md-accent"
ng-class="" ng-mouseenter="select('on')">Update
<div layout="row" flex="grow" layout-align="center center" ng-controller="_showPlots" >
<md-button class="md-raised md-accent" ng-click="showPlots()">
Show Plots
</md-button>
</div>
<!--
<div layout="row" flex="grow" class="" layout-align="center center">
<md-button ng-click="updateA()" class="md-raised md-accent"
ng-class="" ng-mouseenter="select('on')">Update
</md-button>
</div>
-->
</div>
</div>
!-- end test button -->
<!-- gyro status -->
<!-- end test button -->
<!-- gyro status --
<div layout="row" flex="grow">
<div layout="column" flex="grow">
<div class="medbox2" layout="row" flex="30"
Expand All @@ -232,12 +246,12 @@ <h1 class="title">isGyroCalibrated</h1>
</div>
<div layout="row" flex="grow" class="" layout-align="center center">
<state-indicator value="data.sensors.isGyroCalibrated"
radio="16" width="35" height="35" style="height: 35px;">
radio="12" width="28" height="28" style="height: 28px;">
</state-indicator>
</div>
</div>
</div>
<!-- gyro status -->
!-- gyro status -->
</div>
</div>
<!-- Motors Status -->
Expand Down Expand Up @@ -403,6 +417,59 @@ <h1 class="title">Right Drive</h1>
</div>
</div>
</md-tab>
<md-tab label="Voltage" aria-selected="true">
<div layout="column" flex="grow" class="medbox">
<br>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">Front Left </p>
<bar-chart value="data.power.powerFrontLeft" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">Front Right </p>
<bar-chart value="data.power.powerFrontRight" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">Back left </p>
<bar-chart value="data.power.powerBackLeft" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">Back right </p>
<bar-chart value="data.power.powerBackRight" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">Intake </p>
<bar-chart value="data.power.powerIntake" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">Conveyor 1 </p>
<bar-chart value="data.power.powerConveyor1" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">Conveyor 2 </p>
<bar-chart value="data.power.powerConveyor2" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">Shooter 1 </p>
<bar-chart value="data.power.powerShooter1" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">Shooter 2 </p>
<bar-chart value="data.power.powerShooter2" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">Hood 1 </p>
<bar-chart value="data.power.powerHood1" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">Hood 2 </p>
<bar-chart value="data.power.powerHood2" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">RoboRIO</p>
<bar-chart value="data.power.powerRio" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<div class="powerChart" layout="row" layout-align="center center"><p class="powerLabel">PCM</p>
<bar-chart value="data.power.powerPcm" min="0" max="20" width="300" height="20" unit="A"></bar-chart></div>
<br>
</div>
<div layout="column" flex="grow" class="medbox" layout-align="center stretch">
<div layout="row" flex="grow" class="" layout-align="center center" >
<div class="minibox" flex="grow" layout="column" layout-align="space-around center">
<p class="label">Battery Voltage:</p>
<circle-chart class="circleChart" value="data.power.batteryVoltage" unit="v" min="0" max="12" width="80" height="80"></circle-chart>
</div>

<div class="minibox2" flex="grow" layout="column" layout-align="space-around center">
<p class="label">Power Draw:</p>
<circle-chart class="circleChart" value="data.power.totalPowerUse" unit="A" min="0" max="40" width="80" height="80"></circle-chart>
</div>
<div class="minibox" flex="grow" layout="column" layout-align="space-around center">
<p class="label">RIO CPU use:</p>
<circle-chart class="circleChart" value="data.power.rioCpu" unit="%" min="0" max="100" width="80" height="80"></circle-chart>
</div>

<div class="minibox2" flex="grow" layout="column" layout-align="space-around center">
<p class="label">RIO RAM use:</p>
<circle-chart class="circleChart" value="data.power.rioRam" unit="%" min="0" max="100" width="80" height="80"></circle-chart>
</div>
</div>
</div>
<md-tab label="Keyboard">
<div layout="column" flex="grow">
<div layout="row" flex="grow">
Expand Down

0 comments on commit 246e391

Please sign in to comment.