GOLAY: draft voice implementation by Andreas Evesberg
This commit is contained in:
parent
a949470ec3
commit
42a898d3e4
|
@ -240,6 +240,7 @@ static const uint16_t preamble_values[] = {
|
|||
};
|
||||
|
||||
static const uint32_t start_code = 713;
|
||||
static const uint32_t activation_code = 2563;
|
||||
|
||||
/* Rep. 900-2 Table VI */
|
||||
static const uint16_t word1s[50] = {
|
||||
|
@ -660,9 +661,20 @@ static int queue_batch(gsc_t *gsc, const char *address, int force_type, const ch
|
|||
}
|
||||
}
|
||||
|
||||
/* encode comma after message and store */
|
||||
PDEBUG(DGOLAY, DEBUG_DEBUG, "Encoding 'comma' sequence after message.\n");
|
||||
queue_comma(gsc, 121 * 8, 1);
|
||||
if (type == TYPE_VOICE) {
|
||||
/* encode activation code and store */
|
||||
PDEBUG(DGOLAY, DEBUG_DEBUG, "Encoding activation code.\n");
|
||||
golay = calc_golay(activation_code);
|
||||
queue_comma(gsc, 28, golay & 1);
|
||||
queue_dup(gsc, golay, 23);
|
||||
golay ^= 0x7fffff;
|
||||
queue_bit(gsc, (golay & 1) ^ 1);
|
||||
queue_dup(gsc, golay, 23);
|
||||
} else {
|
||||
/* encode comma after message and store */
|
||||
PDEBUG(DGOLAY, DEBUG_DEBUG, "Encoding 'comma' sequence after message.\n");
|
||||
queue_comma(gsc, 121 * 8, 1);
|
||||
}
|
||||
|
||||
/* check overflow */
|
||||
if (gsc->bit_overflow) {
|
||||
|
|
Loading…
Reference in New Issue