Skip to content

Commit

Permalink
Remove dtdBit2Text/dtdBit1Text, allow ngShow/ngHide in the HTML to de…
Browse files Browse the repository at this point in the history
…termine what to use.
  • Loading branch information
dgallegos committed Sep 11, 2013
1 parent d788b68 commit f0fa0e2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 63 deletions.
59 changes: 0 additions & 59 deletions app/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ function EdidCtrl($scope) {
var index = blockDescriptor[1]-1;
$scope.dtd = $scope.edid.dtds[index];
var block = 0;
$scope.updateDtdBit2Text(block,index);
$scope.updateDtdBit1Text(block,index);
$scope.edidData = node.url+"?"+$scope.getRevision();
}
$scope.blockXHandler = function(node){
Expand Down Expand Up @@ -111,8 +109,6 @@ function EdidCtrl($scope) {
var dtdNumber = node.id.replace("tBlock","").substring(1).replace("Dtd","");
var dtdIndex = dtdNumber -1;
$scope.dtd = $scope.ext.dtds[dtdIndex];
$scope.updateDtdBit2Text(blockNumber,dtdIndex);
$scope.updateDtdBit1Text(blockNumber,dtdIndex);
$scope.edidData = node.url+"?"+$scope.getRevision();
}
// QuantumData Default Edid
Expand Down Expand Up @@ -378,61 +374,6 @@ function EdidCtrl($scope) {
var isSet = ($scope.edid.timingBitmap & (msb >> index))?true:false;
return isSet;
}
$scope.updateDtdBit2Text = function(block,index)
{
var bit2Text = new String();
var dtd = {};
if(block == 0)
{
dtd = $scope.edid.dtds[index];
}
else
{
dtd = $scope.edid.exts[block-1].dtds[index];
}

if(dtd.syncType ==
$scope.edid.syncTypeEnum.DIGITAL_SEPARATE)
{
bit2Text = "Vertical Sync Polarity: ";
bit2Text += dtd.vSyncPolarity;
}
else
{
bit2Text = "Vertical Sync Serrated: ";
bit2Text += dtd.vSyncSerrated;
}
$scope.dtd.dtdBit2Text = bit2Text;
}
$scope.updateDtdBit1Text = function(block,index)
{
var bit1Text = new String();
var dtd = {};

if(block == 0)
{
dtd = $scope.edid.dtds[index];
}
else
{
dtd = $scope.edid.exts[block-1].dtds[index];
}

if((dtd.syncType ==
$scope.edid.syncTypeEnum.ANALOG_COMPOSITE) ||
(dtd.syncType ==
$scope.edid.syncTypeEnum.BIPOLAR_ANALOG_COMPOSITE))
{
bit1Text = "Sync on all 3 RGB lines: ";
bit1Text += dtd.syncAllRGBLines;
}
else
{
bit1Text = "HSync polarity: ";
bit1Text += dtd.hSyncPolarity;
}
$scope.dtd.dtdBit1Text = bit1Text;
}
$scope.shortAudioDescView = function(format)
{
var view;
Expand Down
17 changes: 15 additions & 2 deletions app/partials/block0/detailedTimingDescriptors.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ <h2>Detailed Timing Descriptor</h2>
Interlaced: {{dtd.interlaced}} <br />
Stereo Mode: {{dtd.stereoMode}} <br />
Sync Type: {{dtd.syncType}} <br />
{{dtd.dtdBit2Text}} <br />
{{dtd.dtdBit1Text}} <br />
<span ng-show="dtd.syncType == edid.syncTypeEnum.DIGITAL_SEPARATE">
Vertical Sync Polarity: {{dtd.vSyncPolarity}} <br/>
</span>
<span ng-show="dtd.syncType != edid.syncTypeEnum.DIGITAL_SEPARATE">
Vertical Sync Serrated: {{dtd.vSyncSerrated}} <br />
</span>

<span ng-show="(dtd.syncType == edid.syncTypeEnum.ANALOG_COMPOSITE) ||
(dtd.syncType == edid.syncTypeEnum.BIPOLAR_ANALOG_COMPOSITE)">
Sync on all 3 RGB lines: {{dtd.syncAllRGBLines}} <br/>
</span>
<span ng-show="(dtd.syncType != edid.syncTypeEnum.ANALOG_COMPOSITE) &&
(dtd.syncType != edid.syncTypeEnum.BIPOLAR_ANALOG_COMPOSITE)">
HSync polarity: {{dtd.hSyncPolarity}} <br />
</span>
2-Way Line-Interleaved Stereo: {{dtd.twoWayStereo}} <br />
17 changes: 15 additions & 2 deletions app/partials/blockX/extDtds.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ <h3>Detailed Timing Descriptor</h3>
Interlaced: {{dtd.interlaced}} <br />
Stereo Mode: {{dtd.stereoMode}} <br />
Sync Type: {{dtd.syncType}} <br />
{{dtd.dtdBit2Text}} <br />
{{dtd.dtdBit1Text}} <br />
<span ng-show="dtd.syncType == edid.syncTypeEnum.DIGITAL_SEPARATE">
Vertical Sync Polarity: {{dtd.vSyncPolarity}} <br/>
</span>
<span ng-show="dtd.syncType != edid.syncTypeEnum.DIGITAL_SEPARATE">
Vertical Sync Serrated: {{dtd.vSyncSerrated}} <br />
</span>

<span ng-show="(dtd.syncType == edid.syncTypeEnum.ANALOG_COMPOSITE) ||
(dtd.syncType == edid.syncTypeEnum.BIPOLAR_ANALOG_COMPOSITE)">
Sync on all 3 RGB lines: {{dtd.syncAllRGBLines}} <br/>
</span>
<span ng-show="(dtd.syncType != edid.syncTypeEnum.ANALOG_COMPOSITE) &&
(dtd.syncType != edid.syncTypeEnum.BIPOLAR_ANALOG_COMPOSITE)">
HSync polarity: {{dtd.hSyncPolarity}} <br />
</span>
2-Way Line-Interleaved Stereo: {{dtd.twoWayStereo}} <br />

0 comments on commit f0fa0e2

Please sign in to comment.