diff --git a/bandwidth/CTA861.txt b/bandwidth/CTA861.txt index 739ab9c..38eb86f 100644 --- a/bandwidth/CTA861.txt +++ b/bandwidth/CTA861.txt @@ -1,4 +1,4 @@ -Rev,VIC,Alt,H,V,Scan,H tot,H bl,V tot,V bl,H freq (kHz),V freq (Hz),Px CLK,HF,HS,HB,VF,VS,VB,Hpol,Vpol +CTA,VIC,VIC2,H,V,SCAN,H_EFF,H_BLANK,V_EFF,V_BLANK,H_FREQ,V_FREQ,CLK,H_FP,H_SW,H_BP,V_FP,V_SW,V_BP,H_POL,V_POL A,1,,640,480,p,800,160,525,45,31.469,59.94,25.175,16,96,48,10,2,33,n,n A,1,,640,480,p,800,160,525,45,31.5,60,25.2,16,96,48,10,2,33,n,n A,2,3,720,480,p,858,138,525,45,31.469,59.94,27,16,62,60,8,6,31,n,n diff --git a/bandwidth/bandwidth.js b/bandwidth/bandwidth.js index c671bcf..30edb60 100644 --- a/bandwidth/bandwidth.js +++ b/bandwidth/bandwidth.js @@ -1058,13 +1058,27 @@ function SI_set_precision(SI_options, prefixDef, pre2num) { } -async function Load_CTA_861() { - DEBUG('CTA Test 6'); - // Loads the timing definitions for the CTA-861 standard from a csv file +function LoadCTA861(){ + // read text from URL location + var request = new XMLHttpRequest(); + request.open('GET', 'CTA861.txt', true); + request.send(null); + request.onreadystatechange = function () { + if (request.readyState === 4 && request.status === 200) { + var type = request.getResponseHeader('Content-Type'); + if (type.indexOf("text") !== 1) { + return request.responseText; + } + } + } +} + + +async function LoadCTA861_Async() { + DEBUG('CTA Test 7'); + // Loads the timing definitions for the CTA-861 standard from a txt file response = await fetch('CTA861.txt'); CTA861 = $.csv.toObjects(await response.text()); - sleep(100); - DEBUG(CTA861); } @@ -1436,6 +1450,7 @@ function isFloat(num) { window.onpageshow = function() { generate_table('Interface Support', -1); + CTA861 = LoadCTA861(); $('#INPUT_HRES')[0].onchange(); $('#INPUT_VRES')[0].onchange(); $('#INPUT_F')[0].onchange(); diff --git a/bandwidth/index.html b/bandwidth/index.html index c17fd7b..3773fe8 100644 --- a/bandwidth/index.html +++ b/bandwidth/index.html @@ -31,7 +31,7 @@