добавление просмотра примерной скорости на интерфейсе в SCPC модеме

This commit is contained in:
2025-01-20 14:14:56 +03:00
parent 196f7ae5a2
commit bafef9c51c
7 changed files with 49 additions and 10 deletions

View 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 %}