Increased priority of CODEC2 thread, this fixes glitches when generating M17 baseband signal
This commit is contained in:
parent
628c341712
commit
83020d4fa3
|
|
@ -237,6 +237,12 @@ void OpMode_M17::startCodec()
|
||||||
pthread_attr_t codecAttr;
|
pthread_attr_t codecAttr;
|
||||||
pthread_attr_init(&codecAttr);
|
pthread_attr_init(&codecAttr);
|
||||||
pthread_attr_setstacksize(&codecAttr, 16384);
|
pthread_attr_setstacksize(&codecAttr, 16384);
|
||||||
|
#ifdef _MIOSIX
|
||||||
|
// Set priority of CODEC2 thread to the maximum one, the same of RTX thread.
|
||||||
|
struct sched_param param;
|
||||||
|
param.sched_priority = sched_get_priority_max(0);
|
||||||
|
pthread_attr_setschedparam(&codecAttr, ¶m);
|
||||||
|
#endif
|
||||||
pthread_create(&codecThread, &codecAttr, threadFunc, NULL);
|
pthread_create(&codecThread, &codecAttr, threadFunc, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue