GOLAY: draft voice implementation by Andreas Evesberg #15
|
@ -240,6 +240,7 @@ static const uint16_t preamble_values[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint32_t start_code = 713;
|
static const uint32_t start_code = 713;
|
||||||
|
static const uint32_t activation_code = 2563;
|
||||||
|
|
||||||
/* Rep. 900-2 Table VI */
|
/* Rep. 900-2 Table VI */
|
||||||
static const uint16_t word1s[50] = {
|
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 */
|
if (type == TYPE_VOICE) {
|
||||||
PDEBUG(DGOLAY, DEBUG_DEBUG, "Encoding 'comma' sequence after message.\n");
|
/* encode activation code and store */
|
||||||
queue_comma(gsc, 121 * 8, 1);
|
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 */
|
/* check overflow */
|
||||||
if (gsc->bit_overflow) {
|
if (gsc->bit_overflow) {
|
||||||
|
|
Loading…
Reference in New Issue