mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-22 17:52:16 +00:00
bug fix for getFreqFromBand
This commit is contained in:
parent
4d997c1e70
commit
bb5355d32f
@ -57,7 +57,7 @@ class Bands extends CI_Model {
|
|||||||
$results = array();
|
$results = array();
|
||||||
|
|
||||||
foreach($result as $band) {
|
foreach($result as $band) {
|
||||||
$results['b'.strtoupper($band->band)] = array('cw' => $band->cw, 'ssb' => $band->ssb, 'digi' => $band->data);
|
$results['b'.strtoupper($band->band)] = array('CW' => $band->cw, 'SSB' => $band->ssb, 'DIGI' => $band->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var Bands = <?php echo json_encode($bands); ?>;
|
var Bands = <?php echo json_encode($bands); ?>;
|
||||||
var user_id = <?php echo $this->session->userdata('user_id'); ?>;
|
var user_id = <?php echo $this->session->userdata('user_id'); ?>;
|
||||||
|
console.log("Bands Data:", Bands);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -123,6 +123,7 @@ function handleInput() {
|
|||||||
var rst_r = null;
|
var rst_r = null;
|
||||||
items = row.startsWith("day ") ? [row] : row.split(" ");
|
items = row.startsWith("day ") ? [row] : row.split(" ");
|
||||||
var itemNumber = 0;
|
var itemNumber = 0;
|
||||||
|
var freq = 0;
|
||||||
items.forEach((item) => {
|
items.forEach((item) => {
|
||||||
if (item === "") {
|
if (item === "") {
|
||||||
return;
|
return;
|
||||||
@ -415,11 +416,15 @@ function getBandFromFreq(freq) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getFreqFromBand(band, mode) {
|
function getFreqFromBand(band, mode) {
|
||||||
const settingsMode = getSettingsMode(mode.toUpperCase());
|
var settingsMode = getSettingsMode(mode.toUpperCase());
|
||||||
const id = "#" + band + settingsMode;
|
var settingsBand = "b" + band.toUpperCase();
|
||||||
if ($(id).length) {
|
var bandData = Bands[settingsBand];
|
||||||
return $(id).val();
|
|
||||||
}
|
if (bandData) {
|
||||||
|
return bandData[settingsMode] / 1000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSettingsMode(mode) {
|
function getSettingsMode(mode) {
|
||||||
|
Loading…
Reference in New Issue
Block a user