Merge branch 'develop' into packet
This commit is contained in:
77
htdocs/gfx/google_maps_pin.svg
Normal file
77
htdocs/gfx/google_maps_pin.svg
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="5.6444445mm"
|
||||
height="9.847393mm"
|
||||
viewBox="0 0 20 34.892337"
|
||||
id="svg3455"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="Map Pin.svg">
|
||||
<defs
|
||||
id="defs3457" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="12.181359"
|
||||
inkscape:cx="8.4346812"
|
||||
inkscape:cy="14.715224"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1024"
|
||||
inkscape:window-height="705"
|
||||
inkscape:window-x="-4"
|
||||
inkscape:window-y="-4"
|
||||
inkscape:window-maximized="1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<metadata
|
||||
id="metadata3460">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-814.59595,-274.38623)">
|
||||
<g
|
||||
id="g3477"
|
||||
transform="matrix(1.1855854,0,0,1.1855854,-151.17715,-57.3976)">
|
||||
<path
|
||||
sodipodi:nodetypes="sscccccsscs"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4337-3"
|
||||
d="m 817.11249,282.97118 c -1.25816,1.34277 -2.04623,3.29881 -2.01563,5.13867 0.0639,3.84476 1.79693,5.3002 4.56836,10.59179 0.99832,2.32851 2.04027,4.79237 3.03125,8.87305 0.13772,0.60193 0.27203,1.16104 0.33416,1.20948 0.0621,0.0485 0.19644,-0.51262 0.33416,-1.11455 0.99098,-4.08068 2.03293,-6.54258 3.03125,-8.87109 2.77143,-5.29159 4.50444,-6.74704 4.56836,-10.5918 0.0306,-1.83986 -0.75942,-3.79785 -2.01758,-5.14062 -1.43724,-1.53389 -3.60504,-2.66908 -5.91619,-2.71655 -2.31115,-0.0475 -4.4809,1.08773 -5.91814,2.62162 z"
|
||||
style="display:inline;opacity:1;fill:#ff4646;fill-opacity:1;stroke:#d73534;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<circle
|
||||
r="3.0355"
|
||||
cy="288.25278"
|
||||
cx="823.03064"
|
||||
id="path3049"
|
||||
style="display:inline;opacity:1;fill:#590000;fill-opacity:1;stroke-width:0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 13 KiB |
BIN
htdocs/gfx/openwebrx-directcall.png
Normal file
BIN
htdocs/gfx/openwebrx-directcall.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
BIN
htdocs/gfx/openwebrx-groupcall.png
Normal file
BIN
htdocs/gfx/openwebrx-groupcall.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.1 KiB |
BIN
htdocs/gfx/openwebrx-mute.png
Normal file
BIN
htdocs/gfx/openwebrx-mute.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
@ -171,7 +171,34 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="openwebrx-panel" id="openwebrx-panel-metadata" data-panel-name="metadata" data-panel-pos="left" data-panel-order="1" data-panel-size="615,36">
|
||||
<div class="openwebrx-panel openwebrx-meta-panel" id="openwebrx-panel-metadata-ysf" data-panel-name="metadata-ysf" data-panel-pos="left" data-panel-order="2" data-panel-size="145,220">
|
||||
<div class="openwebrx-meta-frame">
|
||||
<div class="openwebrx-meta-slot">
|
||||
<div class="openwebrx-ysf-mode openwebrx-meta-autoclear"></div>
|
||||
<div class="openwebrx-meta-user-image"></div>
|
||||
<div class="openwebrx-ysf-source openwebrx-meta-autoclear"></div>
|
||||
<div class="openwebrx-ysf-up openwebrx-meta-autoclear"></div>
|
||||
<div class="openwebrx-ysf-down openwebrx-meta-autoclear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="openwebrx-panel openwebrx-meta-panel" id="openwebrx-panel-metadata-dmr" data-panel-name="metadata-dmr" data-panel-pos="left" data-panel-order="2" data-panel-size="300,220">
|
||||
<div class="openwebrx-meta-frame">
|
||||
<div class="openwebrx-meta-slot openwebrx-dmr-timeslot-panel">
|
||||
<div class="openwebrx-dmr-slot">Timeslot 1</div>
|
||||
<div class="openwebrx-meta-user-image"></div>
|
||||
<div class="openwebrx-dmr-id openwebrx-meta-autoclear"></div>
|
||||
<div class="openwebrx-dmr-name openwebrx-meta-autoclear"></div>
|
||||
<div class="openwebrx-dmr-target openwebrx-meta-autoclear"></div>
|
||||
</div>
|
||||
<div class="openwebrx-meta-slot openwebrx-dmr-timeslot-panel">
|
||||
<div class="openwebrx-dmr-slot">Timeslot 2</div>
|
||||
<div class="openwebrx-meta-user-image"></div>
|
||||
<div class="openwebrx-dmr-id openwebrx-meta-autoclear"></div>
|
||||
<div class="openwebrx-dmr-name openwebrx-meta-autoclear"></div>
|
||||
<div class="openwebrx-dmr-target openwebrx-meta-autoclear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -928,3 +928,88 @@ img.openwebrx-mirror-img
|
||||
border-color: Red;
|
||||
}
|
||||
|
||||
.openwebrx-meta-slot {
|
||||
width: 145px;
|
||||
height: 196px;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
|
||||
background-color: #676767;
|
||||
padding: 2px 0;
|
||||
color: #333;
|
||||
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.openwebrx-meta-slot, .openwebrx-meta-slot.muted:before {
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.openwebrx-meta-slot.muted:before {
|
||||
display: block;
|
||||
content: "";
|
||||
background-image: url("gfx/openwebrx-mute.png");
|
||||
width:100%;
|
||||
height:133px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
cursor: pointer;
|
||||
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
.openwebrx-meta-slot.active {
|
||||
background-color: #95bbdf;
|
||||
}
|
||||
|
||||
.openwebrx-meta-slot.sync .openwebrx-dmr-slot:before {
|
||||
content:"";
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background-color: #ABFF00;
|
||||
border-radius: 50%;
|
||||
box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #304701 0 -1px 9px, #89FF00 0 2px 12px;
|
||||
}
|
||||
|
||||
.openwebrx-meta-slot:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.openwebrx-meta-slot .openwebrx-meta-user-image {
|
||||
width:100%;
|
||||
height:133px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.openwebrx-meta-slot.active .openwebrx-meta-user-image {
|
||||
background-image: url("gfx/openwebrx-directcall.png");
|
||||
}
|
||||
|
||||
.openwebrx-meta-slot.active .openwebrx-meta-user-image.group {
|
||||
background-image: url("gfx/openwebrx-groupcall.png");
|
||||
}
|
||||
|
||||
.openwebrx-dmr-timeslot-panel * {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.openwebrx-maps-pin {
|
||||
background-image: url("gfx/google_maps_pin.svg");
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-size: contain;
|
||||
display: inline-block;
|
||||
}
|
||||
|
@ -624,7 +624,8 @@ function demodulator_analog_replace(subtype, for_digital)
|
||||
}
|
||||
demodulator_add(new demodulator_default_analog(temp_offset,subtype));
|
||||
demodulator_buttons_update();
|
||||
clear_metadata();
|
||||
hide_digitalvoice_panels();
|
||||
toggle_panel("openwebrx-panel-metadata-" + subtype, true);
|
||||
}
|
||||
|
||||
function demodulator_set_offset_frequency(which,to_what)
|
||||
@ -1315,56 +1316,78 @@ function on_ws_recv(evt)
|
||||
}
|
||||
|
||||
function update_metadata(meta) {
|
||||
var update = function(_, el) {
|
||||
el.innerHTML = "";
|
||||
};
|
||||
if (meta.protocol) switch (meta.protocol) {
|
||||
case 'DMR':
|
||||
if (meta.slot) {
|
||||
var html = 'Timeslot: ' + meta.slot;
|
||||
if (meta.type) html += ' Typ: ' + meta.type;
|
||||
if (meta.additional && meta.additional.callsign) {
|
||||
html += ' Source: ' + meta.additional.callsign;
|
||||
if (meta.additional.fname) {
|
||||
html += ' (' + meta.additional.fname + ')';
|
||||
var el = $("#openwebrx-panel-metadata-dmr .openwebrx-dmr-timeslot-panel").get(meta.slot);
|
||||
var id = "";
|
||||
var name = "";
|
||||
var target = "";
|
||||
var group = false;
|
||||
$(el)[meta.sync ? "addClass" : "removeClass"]("sync");
|
||||
if (meta.sync && meta.sync == "voice") {
|
||||
id = (meta.additional && meta.additional.callsign) || meta.source || "";
|
||||
name = (meta.additional && meta.additional.fname) || "";
|
||||
if (meta.type == "group") {
|
||||
target = "Talkgroup: ";
|
||||
group = true;
|
||||
}
|
||||
} else if (meta.source) {
|
||||
html += ' Source: ' + meta.source;
|
||||
if (meta.type == "direct") target = "Direct: ";
|
||||
target += meta.target || "";
|
||||
$(el).addClass("active");
|
||||
} else {
|
||||
$(el).removeClass("active");
|
||||
}
|
||||
if (meta.target) html += ' Target: ' + meta.target;
|
||||
update = function(_, el) {
|
||||
var slotEl = el.getElementsByClassName('slot-' + meta.slot);
|
||||
if (!slotEl.length) {
|
||||
slotEl = document.createElement('div');
|
||||
slotEl.className = 'slot-' + meta.slot;
|
||||
el.appendChild(slotEl);
|
||||
} else {
|
||||
slotEl = slotEl[0];
|
||||
}
|
||||
slotEl.innerHTML = html;
|
||||
};
|
||||
$(el).find(".openwebrx-dmr-id").text(id);
|
||||
$(el).find(".openwebrx-dmr-name").text(name);
|
||||
$(el).find(".openwebrx-dmr-target").text(target);
|
||||
$(el).find(".openwebrx-meta-user-image")[group ? "addClass" : "removeClass"]("group");
|
||||
} else {
|
||||
clear_metadata();
|
||||
}
|
||||
break;
|
||||
case 'YSF':
|
||||
var strings = [];
|
||||
if (meta.mode) strings.push("Mode: " + meta.mode);
|
||||
if (meta.source) strings.push("Source: " + meta.source);
|
||||
if (meta.target) strings.push("Destination: " + meta.target);
|
||||
if (meta.up) strings.push("Up: " + meta.up);
|
||||
if (meta.down) strings.push("Down: " + meta.down);
|
||||
var html = strings.join(' ');
|
||||
update = function(_, el) {
|
||||
el.innerHTML = html;
|
||||
var el = $("#openwebrx-panel-metadata-ysf");
|
||||
|
||||
var mode = " "
|
||||
var source = "";
|
||||
var up = "";
|
||||
var down = "";
|
||||
if (meta.mode && meta.mode != "") {
|
||||
mode = "Mode: " + meta.mode;
|
||||
source = meta.source || "";
|
||||
if (meta.lat && meta.lon) {
|
||||
source = "<a class=\"openwebrx-maps-pin\" href=\"https://www.google.com/maps/search/?api=1&query=" + meta.lat + "," + meta.lon + "\" target=\"_blank\"></a>" + source;
|
||||
}
|
||||
up = meta.up ? "Up: " + meta.up : "";
|
||||
down = meta.down ? "Down: " + meta.down : "";
|
||||
$(el).find(".openwebrx-meta-slot").addClass("active");
|
||||
} else {
|
||||
$(el).find(".openwebrx-meta-slot").removeClass("active");
|
||||
}
|
||||
$(el).find(".openwebrx-ysf-mode").text(mode);
|
||||
$(el).find(".openwebrx-ysf-source").html(source);
|
||||
$(el).find(".openwebrx-ysf-up").text(up);
|
||||
$(el).find(".openwebrx-ysf-down").text(down);
|
||||
|
||||
break;
|
||||
} else {
|
||||
clear_metadata();
|
||||
}
|
||||
|
||||
$('.openwebrx-panel[data-panel-name="metadata"]').each(update);
|
||||
toggle_panel("openwebrx-panel-metadata", true);
|
||||
}
|
||||
|
||||
function hide_digitalvoice_panels() {
|
||||
$(".openwebrx-meta-panel").each(function(_, p){
|
||||
toggle_panel(p.id, false);
|
||||
});
|
||||
clear_metadata();
|
||||
}
|
||||
|
||||
function clear_metadata() {
|
||||
toggle_panel("openwebrx-panel-metadata", false);
|
||||
$(".openwebrx-meta-panel .openwebrx-meta-autoclear").text("");
|
||||
$(".openwebrx-meta-slot").removeClass("active").removeClass("sync");
|
||||
$(".openwebrx-dmr-timeslot-panel").removeClass("muted");
|
||||
}
|
||||
|
||||
function add_problem(what)
|
||||
@ -1817,7 +1840,12 @@ String.prototype.startswith=function(str){ return this.indexOf(str) == 0; }; //h
|
||||
|
||||
function open_websocket()
|
||||
{
|
||||
ws_url="ws://"+(window.location.origin.split("://")[1])+"/ws/"; //guess automatically -> now default behaviour
|
||||
var protocol = 'ws';
|
||||
if (window.location.toString().startsWith('https://')) {
|
||||
protocol = 'wss';
|
||||
}
|
||||
|
||||
ws_url = protocol + "://" + (window.location.origin.split("://")[1]) + "/ws/"; //guess automatically -> now default behaviour
|
||||
if (!("WebSocket" in window))
|
||||
divlog("Your browser does not support WebSocket, which is required for WebRX to run. Please upgrade to a HTML5 compatible browser.");
|
||||
ws = new WebSocket(ws_url);
|
||||
@ -2311,7 +2339,7 @@ function openwebrx_init()
|
||||
init_rx_photo();
|
||||
open_websocket();
|
||||
secondary_demod_init();
|
||||
clear_metadata();
|
||||
digimodes_init();
|
||||
place_panels(first_show_panel);
|
||||
window.setTimeout(function(){window.setInterval(debug_audio,1000);},1000);
|
||||
window.addEventListener("resize",openwebrx_resize);
|
||||
@ -2322,6 +2350,25 @@ function openwebrx_init()
|
||||
|
||||
}
|
||||
|
||||
function digimodes_init() {
|
||||
hide_digitalvoice_panels();
|
||||
|
||||
// initialze DMR timeslot muting
|
||||
$('.openwebrx-dmr-timeslot-panel').click(function(e) {
|
||||
$(e.currentTarget).toggleClass("muted");
|
||||
update_dmr_timeslot_filtering();
|
||||
});
|
||||
}
|
||||
|
||||
function update_dmr_timeslot_filtering() {
|
||||
var filter = $('.openwebrx-dmr-timeslot-panel').map(function(index, el){
|
||||
return (!$(el).hasClass("muted")) << index;
|
||||
}).toArray().reduce(function(acc, v){
|
||||
return acc | v;
|
||||
}, 0);
|
||||
webrx_set_param("dmr_filter", filter);
|
||||
}
|
||||
|
||||
function iosPlayButtonClick()
|
||||
{
|
||||
//On iOS, we can only start audio from a click or touch event.
|
||||
@ -2409,6 +2456,7 @@ function pop_bottommost_panel(from)
|
||||
function toggle_panel(what, on)
|
||||
{
|
||||
var item=e(what);
|
||||
if (!item) return;
|
||||
if(typeof on !== "undefined")
|
||||
{
|
||||
if(item.openwebrxHidden && !on) return;
|
||||
@ -2472,7 +2520,7 @@ function place_panels(function_apply)
|
||||
for(i=0;i<plist.length;i++)
|
||||
{
|
||||
c=plist[i];
|
||||
if(c.className=="openwebrx-panel")
|
||||
if(c.className.indexOf("openwebrx-panel") >= 0)
|
||||
{
|
||||
if(c.openwebrxHidden)
|
||||
{
|
||||
|
Reference in New Issue
Block a user