fixing rf power level

This commit is contained in:
DJ2LS 2024-05-09 15:48:28 +02:00
parent 4c2e29ae7c
commit 1cf316cb17
3 changed files with 23 additions and 12 deletions

View file

@ -89,17 +89,27 @@ function set_radio_parameter_auto_tuner() {
disabled: state.hamlib_status === 'disconnected',
}"
>
<option value="0">-</option>
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
<option value="50">50</option>
<option value="60">60</option>
<option value="70">70</option>
<option value="80">80</option>
<option value="90">90</option>
<option value="100">100</option>
<option value="0">-</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="20">20</option>
<option value="25">25</option>
<option value="30">30</option>
<option value="35">35</option>
<option value="40">40</option>
<option value="45">45</option>
<option value="50">50</option>
<option value="55">55</option>
<option value="60">60</option>
<option value="65">65</option>
<option value="70">70</option>
<option value="75">75</option>
<option value="80">80</option>
<option value="85">85</option>
<option value="90">90</option>
<option value="95">95</option>
<option value="100">100</option>
</select>
</div>
</div>

View file

@ -89,6 +89,7 @@ export function stateDispatcher(data) {
stateStore.mode = data["radio_mode"];
stateStore.swr = data["radio_swr"];
stateStore.tuner = data["radio_tuner"];
stateStore.rf_level = data["radio_rf_level"]
}
}

View file

@ -14,6 +14,6 @@ export async function processRadioStatus() {
let result = await getRadioStatus();
stateStore.mode = result.radio_mode;
stateStore.frequency = result.radio_frequency;
stateStore.rf_level = result.radio_rf_level;
stateStore.rf_level = Math.round(result.radio_rf_level / 5) * 5; // round to 5er steps
stateStore.tuner = result.radio_tuner;
}