File: drmparams.cpp

package info (click to toggle)
qsstv 9.5.8-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,928 kB
  • sloc: cpp: 47,579; makefile: 4
file content (35 lines) | stat: -rw-r--r-- 644 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "drmparams.h"
#include "configparams.h"

int numTxFrames;
drmTxParams drmParams;
QList<short unsigned int> fixBlockList;

drmTxParams modeToParams(unsigned int mode)
{
  drmTxParams prm;
  prm.robMode=mode/10000;
  mode-=(mode/10000)*10000;
  prm.bandwith=mode/1000;
  mode-=(mode/1000)*1000;
  prm.protection=mode/100;
  mode-=(mode/100)*100;
  prm.qam=mode/10;
  prm.interleaver=0;
  prm.callsign=myCallsign;
  return prm;
}

unsigned int paramsToMode(drmTxParams prm)
{
  uint mode=1;
  mode+=prm.robMode*10000;
  mode+=prm.bandwith*1000;
  mode+=prm.protection*100;
  mode+=prm.qam*10;
  mode+=prm.interleaver;
  return mode;
}