|
176 | 176 | $squelch = $_POST['squelch'];
|
177 | 177 | $ctcss = $_POST['ctcss'];
|
178 | 178 | $tail = $_POST['tail'];
|
| 179 | + $bw = $_POST['bw']; |
| 180 | + /* $bw = 0; */ |
| 181 | + |
179 | 182 |
|
180 |
| - $command = "sa818 --port \"" .$port. "\" radio --frequency \"" .$freq. "\" --offset \"" .$offset. "\" --squelch \"" .$squelch. "\" --ctcss \"" .$ctcss. "\" --close-tail \"" .$tail. "\" 2>&1"; |
| 183 | + $command = "sa818 --port \"" .$port. "\" radio --bw \"" .$bw. "\" --frequency \"" .$freq. "\" --offset \"" .$offset. "\" --squelch \"" .$squelch. "\" --ctcss \"" .$ctcss. "\" --close-tail \"" .$tail. "\" 2>&1"; |
181 | 184 | if (!$retval) exec($command,$screen,$retval);
|
182 | 185 |
|
183 | 186 | if (!$retval) {
|
184 |
| - $RfData['port']=$port;$RfData['freq']=$freq;$RfData['offset']=$offset;$RfData['squelch']=$squelch;$RfData['ctcss']=$ctcss;$RfData['tail']=$tail; |
| 187 | + $RfData['port']=$port;$RfData['freq']=$freq;$RfData['offset']=$offset;$RfData['squelch']=$squelch;$RfData['ctcss']=$ctcss;$RfData['tail']=$tail;$RfData['bw']=$bw; |
185 | 188 | $jsonRfData = json_encode($RfData);
|
186 | 189 | file_put_contents("/var/www/html/rf/sa818.json", $jsonRfData ,FILE_USE_INCLUDE_PATH);
|
187 | 190 | //archive the current config
|
|
244 | 247 | //load json
|
245 | 248 |
|
246 | 249 | $port = $RfData['port'];
|
247 |
| -$freq = $RfData['freq'];$offset=$RfData['offset'];$ctcss=$RfData['ctcss'];$tail=$RfData['tail'];$squelch=$RfData['squelch']; |
| 250 | +$freq = $RfData['freq'];$offset=$RfData['offset'];$ctcss=$RfData['ctcss'];$tail=$RfData['tail'];$squelch=$RfData['squelch'];$bw=$RfData['bw']; |
248 | 251 | $fEmph = $RfData['fEmph'];$fLow=$RfData['fLow'];$fHigh=$RfData['fHigh'];
|
249 | 252 | $volume = $RfData['volume'];
|
250 | 253 |
|
|
259 | 262 | if ($ctcss === "" || is_null($ctcss)) $ctcss = "77.0";
|
260 | 263 | if ($tail === "" || is_null($tail)) $tail = "yes";
|
261 | 264 | if ($squelch === "" || is_null($squelch)) $squelch = "5";
|
| 265 | +if ($bw ==="" || is_null($bw)) $bw = "1"; |
262 | 266 |
|
263 | 267 | //filter
|
264 | 268 | if ($fEmph === "" || is_null($fEmph)) $fEmph = "no";
|
|
313 | 317 | </tr>
|
314 | 318 | <tr>
|
315 | 319 | <Td>
|
316 |
| - Freq: <input type "text" name="freq" style="width: 180px" value="<?php echo $freq;?>"> |
| 320 | + Freq: <input type "text" name="freq" style="width: 120px" value="<?php echo $freq;?>"> |
| 321 | + Bw: <input type "text" name="bw" style="width: 50px" value="<?php echo $bw;?>"> |
317 | 322 | Shift: <input type "text" name="offset" style="width: 50px" value="<?php echo $offset;?>"> <br>
|
318 | 323 | Ctcss: <input type "text" name="ctcss" style="width: 50px" value="<?php echo $ctcss;?>">
|
319 | 324 | Squelch: <input type "text" name="squelch" style="width: 50px" value="<?php echo $squelch;?>">
|
|
0 commit comments