0s and 1s are decoded in the digimode window

This commit is contained in:
ha7ilm
2017-05-06 16:15:32 +02:00
parent 953f24b301
commit 5cc93a03e7
3 changed files with 29 additions and 4 deletions

View File

@ -1173,6 +1173,7 @@ function on_ws_recv(evt)
}
else if(first3Chars=="DAT")
{
secondary_demod_push_binary_data(new Uint8Array(evt.data,4))
console.log("DAT");
}
else if(first3Chars=="MSG")
@ -2252,11 +2253,21 @@ function secondary_demod_waterfall_add_queue(x)
secondary_demod_waterfall_queue.push(what);
}
function secondary_demod_push_binary_data(x)
{
secondary_demod_push_data(Array.from(x).map( y => (y)?"1":"0" ).join(""));
}
function secondary_demod_push_data(x)
{
$("#openwebrx-cursor-blink").before("<span class=\"part\"><span class=\"subpart\">"+x+"</span></span>");
}
function secondary_demod_data_clear()
{
$("#openwebrx-cursor-blink").prevAll().remove();
}
function secondary_demod_close_window()
{
secondary_demod_stop();