mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
work on swr/tuner
This commit is contained in:
parent
8f6ea4ab3e
commit
1ba9386167
2 changed files with 5 additions and 3 deletions
|
@ -51,7 +51,7 @@ export function stateDispatcher(data) {
|
||||||
data = JSON.parse(data);
|
data = JSON.parse(data);
|
||||||
//Leave commented when not needed, otherwise can lead to heap overflows due to the amount of data logged
|
//Leave commented when not needed, otherwise can lead to heap overflows due to the amount of data logged
|
||||||
//console.debug(data);
|
//console.debug(data);
|
||||||
if (data["type"] == "state-change" && data["type"] == "state") {
|
if (data["type"] == "state-change" || data["type"] == "state") {
|
||||||
stateStore.modem_connection = "connected";
|
stateStore.modem_connection = "connected";
|
||||||
stateStore.busy_state = data["is_modem_busy"];
|
stateStore.busy_state = data["is_modem_busy"];
|
||||||
stateStore.channel_busy = data["channel_busy"];
|
stateStore.channel_busy = data["channel_busy"];
|
||||||
|
@ -73,7 +73,7 @@ export function stateDispatcher(data) {
|
||||||
build_HSL();
|
build_HSL();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data["type"] == "state-change" && data["type"] == "radio") {
|
if (data["type"] == "radio-change" || data["type"] == "radio") {
|
||||||
|
|
||||||
stateStore.s_meter_strength_raw = Math.round(data["s_meter_strength"]);
|
stateStore.s_meter_strength_raw = Math.round(data["s_meter_strength"]);
|
||||||
stateStore.s_meter_strength_percent = Math.round(
|
stateStore.s_meter_strength_percent = Math.round(
|
||||||
|
|
|
@ -107,7 +107,7 @@ class StateManager:
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_radio_event(self, isChangedState):
|
def get_radio_event(self, isChangedState):
|
||||||
msgtype = "state-change"
|
msgtype = "radio-change"
|
||||||
if (not isChangedState):
|
if (not isChangedState):
|
||||||
msgtype = "radio"
|
msgtype = "radio"
|
||||||
|
|
||||||
|
@ -117,6 +117,8 @@ class StateManager:
|
||||||
"radio_frequency": self.radio_frequency,
|
"radio_frequency": self.radio_frequency,
|
||||||
"radio_mode": self.radio_mode,
|
"radio_mode": self.radio_mode,
|
||||||
"s_meter_strength": self.s_meter_strength,
|
"s_meter_strength": self.s_meter_strength,
|
||||||
|
"radio_swr" : self.radio_swr,
|
||||||
|
"radio_tuner": self.radio_tuner,
|
||||||
}
|
}
|
||||||
|
|
||||||
# .wait() blocks until the event is set
|
# .wait() blocks until the event is set
|
||||||
|
|
Loading…
Reference in a new issue