This commit is contained in:
Silent YANG 2024-02-12 23:46:55 +08:00
parent 124172f6f0
commit 0b639732ff

View file

@ -195,10 +195,11 @@ const changeSat = async (sat: any) => {
let freqFlag = false let freqFlag = false
state.freqDb.map((e: any)=>{ state.freqDb.map((e: any)=>{
if(data.path[1].split(" ")[1] == e.norad_id && e.mode.indexOf('FM') != -1){ if(data.path[1].split(" ")[1] == e.norad_id && e.mode.indexOf('FM') != -1){
console.log(e)
freqFlag = true freqFlag = true
state.tx = parseFloat(e.uplink) state.tx = e.uplink ? parseFloat(e.uplink.split('/')[0]) : 0
state.rx = parseFloat(e.downlink) state.rx = e.downlink ? parseFloat(e.downlink.split('/')[0]) : 0
state.txTone = parseFloat(state.CTCSSOption.reduce((_e: any, _n: any)=>{ state.txTone = parseFloat([0, ...state.CTCSSOption].reduce((_e: any, _n: any)=>{
return e.mode.indexOf(_n) != -1 ? _n : _e return e.mode.indexOf(_n) != -1 ? _n : _e
})) }))
} }