mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-18 23:55:58 -05:00
Webchat Send Beacon uses Path selected in UI
This patch changes the Send Beacon button capability in webchat to use the path selected in the UI for the actual beacon being sent out.
This commit is contained in:
parent
88d26241f5
commit
4c7e27c88b
@ -543,6 +543,14 @@ class SendMessageNamespace(Namespace):
|
|||||||
long = data["longitude"]
|
long = data["longitude"]
|
||||||
LOG.debug(f"Lat {lat}")
|
LOG.debug(f"Lat {lat}")
|
||||||
LOG.debug(f"Long {long}")
|
LOG.debug(f"Long {long}")
|
||||||
|
path = data.get("path", None)
|
||||||
|
if not path:
|
||||||
|
path = []
|
||||||
|
elif "," in path:
|
||||||
|
path_opts = path.split(",")
|
||||||
|
path = [x.strip() for x in path_opts]
|
||||||
|
else:
|
||||||
|
path = [path]
|
||||||
|
|
||||||
tx.send(
|
tx.send(
|
||||||
packets.BeaconPacket(
|
packets.BeaconPacket(
|
||||||
@ -551,6 +559,7 @@ class SendMessageNamespace(Namespace):
|
|||||||
latitude=lat,
|
latitude=lat,
|
||||||
longitude=long,
|
longitude=long,
|
||||||
comment="APRSD WebChat Beacon",
|
comment="APRSD WebChat Beacon",
|
||||||
|
path=path,
|
||||||
),
|
),
|
||||||
direct=True,
|
direct=True,
|
||||||
)
|
)
|
||||||
|
@ -64,9 +64,11 @@ function showError(error) {
|
|||||||
|
|
||||||
function showPosition(position) {
|
function showPosition(position) {
|
||||||
console.log("showPosition Called");
|
console.log("showPosition Called");
|
||||||
|
path = $('#pkt_path option:selected').val();
|
||||||
msg = {
|
msg = {
|
||||||
'latitude': position.coords.latitude,
|
'latitude': position.coords.latitude,
|
||||||
'longitude': position.coords.longitude
|
'longitude': position.coords.longitude,
|
||||||
|
'path': path,
|
||||||
}
|
}
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
$.toast({
|
$.toast({
|
||||||
|
Loading…
Reference in New Issue
Block a user