beacons added

This commit is contained in:
richonguzman 2024-09-30 16:58:52 -03:00
parent da7a044e9e
commit 04635cff57
9 changed files with 89 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -86,6 +86,32 @@
<div class="container" id="configuration">
<main>
<div class="col-10 my-5 mx-auto">
<div class="row my-5 d-flex align-items-top">
<div class="col-lg-3 col-sm-12">
<h5>
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
fill="currentColor"
class="bi bi-broadcast-pin"
viewBox="0 0 16 16"
>
<path
d="M3.05 3.05a7 7 0 0 0 0 9.9.5.5 0 0 1-.707.707 8 8 0 0 1 0-11.314.5.5 0 0 1 .707.707m2.122 2.122a4 4 0 0 0 0 5.656.5.5 0 1 1-.708.708 5 5 0 0 1 0-7.072.5.5 0 0 1 .708.708m5.656-.708a.5.5 0 0 1 .708 0 5 5 0 0 1 0 7.072.5.5 0 1 1-.708-.708 4 4 0 0 0 0-5.656.5.5 0 0 1 0-.708m2.122-2.12a.5.5 0 0 1 .707 0 8 8 0 0 1 0 11.313.5.5 0 0 1-.707-.707 7 7 0 0 0 0-9.9.5.5 0 0 1 0-.707zM6 8a2 2 0 1 1 2.5 1.937V15.5a.5.5 0 0 1-1 0V9.937A2 2 0 0 1 6 8"
/>
</svg>
Beacons
</h5>
<small>Add your personal configuration for each Callsign of Tracker Station.</small>
</div>
<div
id="beacon-settings"
class="list-beacon col-9">
</div>
</div>
<hr />
<div class="row my-5 d-flex align-items-top">
<div class="col-lg-3 col-sm-12">
<h5>

Binary file not shown.

View File

@ -54,6 +54,68 @@ function loadSettings(settings) {
currentSettings = settings;
// BEACONS
const beaconContainer = document.getElementById("beacon-settings");
beaconContainer.innerHTML = ""; // Clear previous content
settings.beacons.forEach((beacons, index) => {
const beaconElement = document.createElement("div");
beaconElement.classList.add("row", "beacons", "border-bottom", "py-2");
beaconElement.innerHTML = `
<div class="col-1 px-1 mb-2 d-flex align-items-center">
<strong>${index + 1})</strong> <!-- Adding numbering here -->
</div>
<div class="form-floating col-6 col-md-3 px-1 mb-2">
<input
type="text"
class="form-control form-control-sm"
name="beacons.${index}.callsign"
id="beacons.${index}.callsign"
value="${beacons.callsign}">
<label for="beacons.${index}.callsign">Callsign</label>
</div>
<div class="form-floating col-6 col-md-2 px-1 mb-2">
<input
type="text"
class="form-control form-control-sm"
name="beacons.${index}.symbol"
id="beacons.${index}.symbol"
value="${beacons.symbol}">
<label for="beacons.${index}.symbol">Symbol</label>
</div>
<div class="form-floating col-6 col-md-2 px-1 mb-2">
<input
type="text"
class="form-control form-control-sm"
name="beacons.${index}.overlay"
id="beacons.${index}.overlay"
value="${beacons.overlay}">
<label for="beacons.${index}.overlay">Overlay</label>
</div>
<div class="form-floating col-6 col-md-2 px-1 mb-2">
<input
type="text"
class="form-control form-control-sm"
name="beacons.${index}.micE"
id="beacons.${index}.micE"
value="${beacons.micE}">
<label for="beacons.${index}.micE">Mic-E</label>
</div>
<div class="form-floating col-6 col-md-6 px-1 mb-2" style="margin-left: 50px;">
<input
type="text"
class="form-control form-control-sm"
name="beacons.${index}.comment"
id="beacons.${index}.comment"
value="${beacons.comment}">
<label for="beacons.${index}.comment">Comment</label>
</div>
`;
beaconContainer.appendChild(beaconElement);
});
// gpsEcoMode
// smartBeaconActive
// smartBeaconSetting
// ADITIONAL STATION CONFIG
document.getElementById("simplifiedTrackerMode").checked = settings.other.simplifiedTrackerMode;

Binary file not shown.

Binary file not shown.

View File

@ -49,7 +49,7 @@ TinyGPSPlus gps;
OneButton userButton = OneButton(BUTTON_PIN, true, true);
#endif
String versionDate = "2024.09.24";
String versionDate = "2024.09.30";
uint8_t myBeaconsIndex = 0;
int myBeaconsSize = Config.beacons.size();