This commit is contained in:
Charles Lohr 2016-08-03 21:35:58 -04:00
commit c54dcf504a
4 changed files with 22 additions and 5 deletions

View file

@ -14,6 +14,11 @@
#define BLOCK_SIZE 65536
#define SECTOR_SIZE 4096
#define PADDING 1024
#ifndef MSG_NOSIGNAL
#define MSG_NOSIGNAL 0x0 //Don't request NOSIGNAL on systems where this is not implemented.
#endif
int sockfd;
struct sockaddr_in servaddr,cliaddr;

View file

@ -14,6 +14,9 @@ td { vertical-align: top; }
.inbutton { background-color:blue; }
#SystemMessage { position: fixed; top: 5px; background-color: DarkSlateBlue; color: #ffffff; left: 5px; display:none; }
.dragandrophandler { border:2px dotted #0B85A1; color:#92AAB0;vertical-align:middle;padding:10px 10px 10 10px;margin-bottom:10px;font-size:200%;}
input[type="range"] {position: relative;margin-left: 1em;}
input[type="range"]:after, input[type="range"]:before {position: absolute;top: 1em;color: #aaa;}
input[type="range"]:before {left:0em; content: attr(min);}input[type="range"]:after {right: 0em;content: attr(max);}
</style>
</head>
<body>
@ -38,7 +41,7 @@ td { vertical-align: top; }
<div id=OScope class="collapsible">
<table width=100% border=1><tr><td width=10%>
<CANVAS id=OScopeCanvas width=512></CANVAS>
</td><td><input type=button onclick="ToggleOScopePause();" id=OScopePauseButton value="|| / >"></td></tr></table></div></td></tr>
</td><td><input type=button onclick="ToggleOScopePause();" id=OScopePauseButton value="|| / >"><input id="OSCMultIn" type="range" value="1" max="5" min="0" step="0.1"><output id="OSCMultOut"></output></td></tr></table></div></td></tr>
<tr><td width=1>
@ -47,7 +50,7 @@ td { vertical-align: top; }
<table width=100% border=1><tr><td width=10%>
<CANVAS id=DFTCanvas width=512></CANVAS>
</td><td><select id=WhichCanvas><option value=0>DFT</option><option value=1>Fuzzed</option><option value=2>Folded</option></select>
<br><input type=button onclick="ToggleDFTPause();" id=DFTPauseButton value="|| / >"></td></tr></table></div></td></tr>
<br><input type=button onclick="ToggleDFTPause();" id=DFTPauseButton value="|| / >"><input id="DFTMultIn" type="range" value="1" max="20" min="0" step="0.1"><output id="DFTMultOut"></output></td></tr></table></div></td></tr>
<tr><td width=1>

View file

@ -102,6 +102,8 @@ function ToggleOScopePause()
function GotOScope(req,data)
{
var mult = Number(document.getElementById('OSCMultIn').value);
document.getElementById('OSCMultOut').innerHTML = mult;
var canvas = document.getElementById('OScopeCanvas');
var ctx = canvas.getContext('2d');
var h = canvas.height;
@ -122,12 +124,12 @@ function GotOScope(req,data)
{
var x2 = (i+1) * canvas.clientWidth / samps;
var samp = parseInt( data.substr(i*2+2,2),16 );
var y2 = ( 1.-samp / 255 ) * canvas.clientHeight;
var y2 = ( 1.-mult*samp / 255 ) * canvas.clientHeight;
if( i == 0 )
{
var x1 = i * canvas.clientWidth / samps;
var y1 = ( 1.-lastsamp / 255 ) * canvas.clientHeight;
var y1 = ( 1.-mult*lastsamp / 255 ) * canvas.clientHeight;
ctx.moveTo( x1, y1 );
}
@ -184,6 +186,8 @@ function ToggleDFTPause()
function GotDFT(req,data)
{
var mult = Number(document.getElementById('DFTMultIn').value);
document.getElementById('DFTMultOut').innerHTML = mult;
var canvas = document.getElementById('DFTCanvas');
var ctx = canvas.getContext('2d');
var h = canvas.height;
@ -205,7 +209,7 @@ function GotDFT(req,data)
{
var x2 = i * canvas.clientWidth / samps;
var samp = parseInt( data.substr(i*4,4),16 );
var y2 = ( 1.-samp / 2047 ) * canvas.clientHeight;
var y2 = ( 1.-mult*samp / 2047 ) * canvas.clientHeight;
ctx.fillStyle = CCColor( i % globalParams["rFIXBPERO"] );
ctx.fillRect( x2, y2, canvas.clientWidth / samps, canvas.clientHeight-y2 );

View file

@ -12,6 +12,11 @@
#include <string.h>
#define sector_SIZE 4096
#ifndef MSG_NOSIGNAL
#define MSG_NOSIGNAL 0x0 //Don't request NOSIGNAL on systems where this is not implemented.
#endif
int sockfd;
char recvline[10000];