Fixed typos

This commit is contained in:
Andreas Eversberg
2017-01-08 12:10:29 +01:00
parent bf0abd627d
commit a5fd375237
7 changed files with 12 additions and 12 deletions

View File

@@ -410,7 +410,7 @@ int amps_create(int channel, enum amps_chan_type chan_type, const char *audiodev
/* check if channel type matches channel number */ /* check if channel type matches channel number */
ct = amps_channel2type(channel); ct = amps_channel2type(channel);
if (ct == CHAN_TYPE_CC && chan_type != CHAN_TYPE_PC && chan_type != CHAN_TYPE_CC_PC && chan_type != CHAN_TYPE_CC_PC_VC) { if (ct == CHAN_TYPE_CC && chan_type != CHAN_TYPE_PC && chan_type != CHAN_TYPE_CC_PC && chan_type != CHAN_TYPE_CC_PC_VC) {
PDEBUG(DAMPS, DEBUG_ERROR, "Channel number %d belongs to a control channel, but your channel type '%s' requires to be on a voice channel number. Some phone may reject this.\n", channel, chan_type_long_name(chan_type)); PDEBUG(DAMPS, DEBUG_NOTICE, "Channel number %d belongs to a control channel, but your channel type '%s' requires to be on a voice channel number. Some phone may reject this, but all my phones don't.\n", channel, chan_type_long_name(chan_type));
} }
if (ct == CHAN_TYPE_VC && chan_type != CHAN_TYPE_VC) { if (ct == CHAN_TYPE_VC && chan_type != CHAN_TYPE_VC) {
PDEBUG(DAMPS, DEBUG_ERROR, "Channel number %d belongs to a voice channel, but your channel type '%s' requires to be on a control channel number. Please use correct channel.\n", channel, chan_type_long_name(chan_type)); PDEBUG(DAMPS, DEBUG_ERROR, "Channel number %d belongs to a voice channel, but your channel type '%s' requires to be on a control channel number. Please use correct channel.\n", channel, chan_type_long_name(chan_type));
@@ -430,7 +430,7 @@ int amps_create(int channel, enum amps_chan_type chan_type, const char *audiodev
/* check if we use combined voice channel hack */ /* check if we use combined voice channel hack */
if (chan_type == CHAN_TYPE_CC_PC_VC) { if (chan_type == CHAN_TYPE_CC_PC_VC) {
PDEBUG(DAMPS, DEBUG_NOTICE, "You selected '%s'. This is a hack, but the only way to use control channel and voice channel on one transceiver. Some phones may reject this.\n", chan_type_long_name(chan_type)); PDEBUG(DAMPS, DEBUG_NOTICE, "You selected '%s'. This is a hack, but the only way to use control channel and voice channel on one transceiver. Some phones may reject this, but all my phones don't.\n", chan_type_long_name(chan_type));
} }
amps = calloc(1, sizeof(amps_t)); amps = calloc(1, sizeof(amps_t));
@@ -1046,7 +1046,7 @@ again:
case TRANS_CALL_MT_ASSIGN_SEND: case TRANS_CALL_MT_ASSIGN_SEND:
vc = assign_voice_channel(trans); vc = assign_voice_channel(trans);
if (vc) { if (vc) {
PDEBUG_CHAN(DAMPS, DEBUG_INFO, "Assignment complete, next: sending altering on VC\n"); PDEBUG_CHAN(DAMPS, DEBUG_INFO, "Assignment complete, next: sending alerting on VC\n");
trans->chan = 0; trans->chan = 0;
trans->msg_type = 0; trans->msg_type = 0;
trans->ordq = 0; trans->ordq = 0;
@@ -1088,7 +1088,7 @@ again:
amps_go_idle(amps); amps_go_idle(amps);
goto again; goto again;
case TRANS_CALL_MT_ALERT: case TRANS_CALL_MT_ALERT:
PDEBUG_CHAN(DAMPS, DEBUG_INFO, "Sending altering\n"); PDEBUG_CHAN(DAMPS, DEBUG_INFO, "Sending alerting\n");
return trans; return trans;
default: default:
return NULL; return NULL;

View File

@@ -350,7 +350,7 @@ static int fsk_encode(amps_t *amps, char bit)
} while (phase < 256.0); } while (phase < 256.0);
phase -= 256.0; phase -= 256.0;
} }
/* ramp up */ /* ramp down */
do { do {
*spl++ = ramp_down[(int)phase]; *spl++ = ramp_down[(int)phase];
phase += bitstep; phase += bitstep;

View File

@@ -1491,9 +1491,9 @@ void cnetz_decode_telegramm(cnetz_t *cnetz, const char *bits, double level, doub
telegramm.jitter = jitter; telegramm.jitter = jitter;
if (bit_errors) if (bit_errors)
PDEBUG_CHAN(DDSP, DEBUG_INFO, "RX Level: %.0f%% Jitter: %.2f Sync Time: %.2f (TS %.2f) Bit errors: %d %s\n", fabs(level) * 32767.0 / cnetz->fsk_deviation * 100.0, jitter, sync_time, sync_time / 396.0, bit_errors, (level < 0) ? "NEGATIVE" : "POSITIVE"); PDEBUG_CHAN(DDSP, DEBUG_INFO, "RX Level: %.0f%% Jitter: %.2f Sync Time: %.2f (TS %.2f) Bit errors: %d %s\n", fabs(level) * 32767.0 / cnetz->fsk_deviation * 100.0, jitter, sync_time, sync_time / 396.0, bit_errors, (level < 0) ? "NEGATIVE (phone's mode)" : "POSITIVE (base station's mode)");
else else
PDEBUG_CHAN(DDSP, DEBUG_INFO, "RX Level: %.0f%% Jitter: %.2f Sync Time: %.2f (TS %.2f) %s\n", fabs(level) * 32767.0 / cnetz->fsk_deviation * 100.0, jitter, sync_time, sync_time / 396.0, (level < 0) ? "NEGATIVE" : "POSITIVE"); PDEBUG_CHAN(DDSP, DEBUG_INFO, "RX Level: %.0f%% Jitter: %.2f Sync Time: %.2f (TS %.2f) %s\n", fabs(level) * 32767.0 / cnetz->fsk_deviation * 100.0, jitter, sync_time, sync_time / 396.0, (level < 0) ? "NEGATIVE (phone's mode)" : "POSITIVE (base station's mode)");
if (cnetz->sender.loopback) { if (cnetz->sender.loopback) {
PDEBUG(DFRAME, DEBUG_NOTICE, "Received Telegramm in loopback test mode (opcode %d = %s)\n", opcode, definition_opcode[opcode].message_name); PDEBUG(DFRAME, DEBUG_NOTICE, "Received Telegramm in loopback test mode (opcode %d = %s)\n", opcode, definition_opcode[opcode].message_name);

View File

@@ -250,7 +250,7 @@ void opt_switch_common(int c, char *arg0, int *skip_args)
case 'p': case 'p':
if (!uses_emphasis) { if (!uses_emphasis) {
no_emph: no_emph:
fprintf(stderr, "A-Netz does not use emphasis, please do not enable pre- or de-emphasis! Disable emphasis on transceiver, if possible.\n"); fprintf(stderr, "This network does not use emphasis, please do not enable pre- or de-emphasis! Disable emphasis on transceiver, if possible.\n");
exit(0); exit(0);
} }
do_pre_emphasis = 1; do_pre_emphasis = 1;
@@ -265,7 +265,7 @@ void opt_switch_common(int c, char *arg0, int *skip_args)
case 'g': case 'g':
gain_db = atof(optarg); gain_db = atof(optarg);
if (gain_db < 0.0) { if (gain_db < 0.0) {
fprintf(stderr, "Given gain is below 0. Tto reduce RX signal, use sound card's mixer (or resistor net)!\n"); fprintf(stderr, "Given gain is below 0. To reduce RX signal, use sound card's mixer (or resistor net)!\n");
exit(0); exit(0);
} }
rx_gain = pow(10, gain_db / 20.0); rx_gain = pow(10, gain_db / 20.0);