добавил изменение параметров dpdi (CinC)
This commit is contained in:
115
static/main.html
115
static/main.html
@@ -598,6 +598,55 @@
|
||||
return modcods[modcod]
|
||||
}
|
||||
|
||||
function toModcod(modulation, speed) {
|
||||
switch (modulation.toLowerCase()) {
|
||||
case 'qpsk':
|
||||
switch (speed) {
|
||||
case '1/4': return 1
|
||||
case '1/3': return 2
|
||||
case '2/5': return 3
|
||||
case '1/2': return 4
|
||||
case '3/5': return 5 // отключено
|
||||
case '2/3': return 6
|
||||
case '3/4': return 7
|
||||
case '4/5': return 8
|
||||
case '5/6': return 9
|
||||
case '8/9': return 10
|
||||
case '9/1': return 11
|
||||
default: return 1 // минимальная скорость
|
||||
}
|
||||
case '8psk':
|
||||
switch (speed) {
|
||||
case '3/5': return 12 // отключено
|
||||
case '2/3': return 13
|
||||
case '3/4': return 14
|
||||
case '5/6': return 15
|
||||
case '8/9': return 16
|
||||
case '9/10': return 17
|
||||
default: return 12 // минимальная скорость
|
||||
}
|
||||
case '16apsk':
|
||||
switch (speed) {
|
||||
case '2/3': return 18
|
||||
case '3/4': return 19
|
||||
case '4/5': return 20
|
||||
case '5/6': return 21
|
||||
case '8/9': return 22
|
||||
case '9/10': return 23
|
||||
default: return 18 // минимальная скорость
|
||||
}
|
||||
case '32apsk':
|
||||
switch (speed) {
|
||||
case '3/4': return 24
|
||||
case '4/5': return 25
|
||||
case '5/6': return 26
|
||||
case '8/9': return 27
|
||||
case '9/10': return 28
|
||||
default: return 24
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function extractModulationAndSpeedFromModcod(modcod) {
|
||||
switch (modcod) {
|
||||
case 1: return { modulation: 'qpsk', speed: '1/4' }
|
||||
@@ -851,12 +900,78 @@
|
||||
|
||||
settingsSubmitRxTx() {
|
||||
if (this.submitStatus.rxTx) { return }
|
||||
// потом добавить: "dvbs2.isPilots": this.param.dvbs2.isPilots
|
||||
let query = {
|
||||
"general.isCinC": this.param.general.isCinC,
|
||||
"general.txEn": this.param.general.txEn,
|
||||
"general.modulatorMode": this.param.general.modulatorMode,
|
||||
"general.autoStartTx": this.param.general.autoStartTx,
|
||||
"general.isTestInputData": this.param.general.isTestInputData,
|
||||
"tx.attenuation": this.param.tx.attenuation,
|
||||
"tx.rolloff": this.param.tx.rolloff,
|
||||
"tx.cymRate": this.param.tx.cymRate,
|
||||
"tx.centerFreq": this.param.tx.centerFreq,
|
||||
"dvbs2.isAcm": this.param.dvbs2.mode === 'acm',
|
||||
"dvbs2.frameSizeNormal": this.param.dvbs2.frameSizeNormal,
|
||||
"dvbs2.ccm_modcod": toModcod(this.param.dvbs2.ccm_modulation, this.param.dvbs2.ccm_speed),
|
||||
"dvbs2.acm_minModcod": toModcod(this.param.dvbs2.acm_minModulation, this.param.dvbs2.acm_minSpeed),
|
||||
"dvbs2.acm_maxModcod": toModcod(this.param.dvbs2.acm_maxModulation, this.param.dvbs2.acm_maxSpeed),
|
||||
"dvbs2.snrReserve": this.param.dvbs2.snrReserve,
|
||||
"dvbs2.servicePacketPeriod": this.param.dvbs2.servicePacketPeriod,
|
||||
"acm.en": this.param.acm.en,
|
||||
"acm.maxAttenuation": this.param.acm.maxAttenuation,
|
||||
"acm.minAttenuation": this.param.acm.minAttenuation,
|
||||
"acm.requiredSnr": this.param.acm.requiredSnr,
|
||||
"rx.gainMode": this.param.rx.gainMode,
|
||||
"rx.manualGain": this.param.rx.manualGain,
|
||||
"rx.spectrumInversion": this.param.rx.spectrumInversion,
|
||||
"rx.rolloff": this.param.rx.rolloff,
|
||||
"rx.cymRate": this.param.rx.cymRate,
|
||||
"rx.centerFreq": this.param.rx.centerFreq
|
||||
}
|
||||
|
||||
this.submitStatus.rxTx = true
|
||||
fetch('/api/set/rxtx', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(query)
|
||||
}).then(async (resp) => {
|
||||
this.submitStatus.rxTx = false
|
||||
this.updateCincSettings(await resp.json())
|
||||
}).catch((reason) => {
|
||||
this.submitStatus.rxTx = false
|
||||
alert(`Ошибка при применении настроек: ${reason}`)
|
||||
})
|
||||
},
|
||||
|
||||
settingsSubmitCinC() {
|
||||
if (this.submitStatus.cinc) { return }
|
||||
|
||||
let query = {
|
||||
"cinc.mode": this.param.cinc.mode,
|
||||
"cinc.searchBandwidth": parseInt(this.param.cinc.searchBandwidth),
|
||||
"cinc.position.station.latitude": parseFloat(this.param.cinc.position.station.latitude),
|
||||
"cinc.position.station.longitude": parseFloat(this.param.cinc.position.station.longitude),
|
||||
"cinc.position.satelliteLongitude": parseFloat(this.param.cinc.position.satelliteLongitude),
|
||||
"cinc.delayMin": parseInt(this.param.cinc.delayMin),
|
||||
"cinc.delayMax": parseInt(this.param.cinc.delayMax)
|
||||
}
|
||||
this.submitStatus.cinc = true
|
||||
fetch('/api/set/cinc', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(query)
|
||||
}).then(async (resp) => {
|
||||
this.submitStatus.cinc = false
|
||||
this.updateCincSettings(await resp.json())
|
||||
}).catch((reason) => {
|
||||
this.submitStatus.cinc = false
|
||||
alert(`Ошибка при применении настроек: ${reason}`)
|
||||
})
|
||||
},
|
||||
|
||||
settingsSubmitBucLnb() {
|
||||
|
Reference in New Issue
Block a user