добавление просмотра примерной скорости на интерфейсе в SCPC модеме
This commit is contained in:
8
front-generator/template/common/setup-methods.js.j2
Normal file
8
front-generator/template/common/setup-methods.js.j2
Normal file
@@ -0,0 +1,8 @@
|
||||
{% if 'rxtx' in params and modem == 'scpc' %}
|
||||
calcInterfaceSpeedKb(baud, modulation, speed) {
|
||||
const mMod = Math.max(2, ['', '', 'qpsk', '8psk', '16apsk', '32apsk'].indexOf(modulation))
|
||||
const speedVals = {'1/4': 0.25, '1/3': 0.333, '2/5': 0.4, '1/2': 0.5, '3/5': 0.6, '2/3': 0.666, '3/4': 0.75, '4/5': 0.8, '5/6': 0.833, '8/9': 0.888, '9/10': 0.9}
|
||||
const mSpeed = speed in speedVals ? speedVals[speed] : 1
|
||||
return ((baud * mMod * mSpeed) / 1024).toLocaleString()
|
||||
},
|
||||
{% endif %}
|
Reference in New Issue
Block a user