mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-25 11:32:35 +00:00
Merge pull request #867 from phl0/zeroFrequency
Just give empty result on frequency being 0
This commit is contained in:
@@ -258,6 +258,10 @@ class Frequency {
|
||||
*/
|
||||
function qrg_conversion($frequency, $r_option = 1, $source_unit = 'Hz', $target_unit = NULL) {
|
||||
|
||||
if ($frequency == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$CI = &get_instance();
|
||||
|
||||
// Get the band
|
||||
|
||||
@@ -89,16 +89,19 @@
|
||||
</tr>
|
||||
|
||||
<?php if($this->config->item('display_freq') == true) { ?>
|
||||
<tr>
|
||||
<td><?= __("Frequency"); ?></td>
|
||||
<td><?php echo $this->frequency->qrg_conversion($row->COL_FREQ); ?></td>
|
||||
</tr>
|
||||
<?php if($row->COL_FREQ_RX != 0) { ?>
|
||||
<tr>
|
||||
<td><?= __("Frequency (RX)"); ?></td>
|
||||
<td><?php echo $this->frequency->qrg_conversion($row->COL_FREQ_RX); ?></td>
|
||||
</tr>
|
||||
<?php }} ?>
|
||||
<?php if($row->COL_FREQ != 0) { ?>
|
||||
<tr>
|
||||
<td><?= __("Frequency"); ?></td>
|
||||
<td><?php echo $this->frequency->qrg_conversion($row->COL_FREQ); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if($row->COL_FREQ_RX != 0) { ?>
|
||||
<tr>
|
||||
<td><?= __("Frequency (RX)"); ?></td>
|
||||
<td><?php echo $this->frequency->qrg_conversion($row->COL_FREQ_RX); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<td><?= __("Mode"); ?></td>
|
||||
|
||||
Reference in New Issue
Block a user