Fixed typos in cli output and source code comments

This commit is contained in:
Martin Hauke
2021-01-01 22:11:48 +01:00
committed by Andreas Eversberg
parent 97636aac1e
commit a07764f0d9
79 changed files with 192 additions and 192 deletions

View File

@@ -42,7 +42,7 @@
* If no SpK is available, the call is rejected. If queue (Warteschlange) is
* enabled, WSK(R) is scheduled. After transmission, the state changes to
* TRANS_MT_QUEUE. Upon timeout (no channel becomes available), the call is
* rejected by scheduling VA(R). Upon available channel the call proceeeds with
* rejected by scheduling VA(R). Upon available channel the call proceeds with
* VAK(R) as described above.
*
* If an MO (mobile originating) call is made (received VWG(K)), a transaction
@@ -57,11 +57,11 @@
* (Warteschlange) is enabled, WWBP(R) is scheduled. After transmission, the
* state is changed to TRANS_MO_QUEUE. Upon timeout (no channel becomes
* available), the call is rejected by scheduling VA(R). Upon available channel
* the call proceeeds with VAG(R) as described above.
* the call proceeds with VAG(R) as described above.
*
* Switching to SpK is performed two time slots after transmitting VAK(R) or
* VAG(R). The timer is started. The schedulers schedules 8 times BQ(K) and
* awaits at least one BEL(K). If BEK(K) is received, the timer is stoped. If
* awaits at least one BEL(K). If BEK(K) is received, the timer is stopped. If
* BQ(K) was sent at least 8 times and if timer is stopped, the scheduler
* schedules VHQ(K). If no BEL(K) was received, AFK(K) is scheduled N_AFKT
* times, then the process on OgK (WBP+VAG or VAK) is repeated N times.
@@ -114,7 +114,7 @@
/*
* Notes on the combined channel hack:
*
* For combined SpK+OgK hack, the channel is used as SpK as last choise. This
* For combined SpK+OgK hack, the channel is used as SpK as last choice. This
* allows to use only one transceiver for making C-Netz to work. Also it allows
* to use all transceivers for simultanious phone calls. Some phones may not
* work with that.
@@ -508,7 +508,7 @@ void cnetz_go_idle(cnetz_t *cnetz)
/* set scheduler to OgK or turn off SpK */
if (cnetz->dsp_mode == DSP_MODE_SPK_K || cnetz->dsp_mode == DSP_MODE_SPK_V) {
/* switch next frame after distributed signaling boundary (mutliple of 8 slots) */
/* switch next frame after distributed signaling boundary (multiple of 8 slots) */
cnetz_set_sched_dsp_mode(cnetz, (atoi(cnetz->sender.kanal) == CNETZ_OGK_KANAL) ? DSP_MODE_OGK : DSP_MODE_OFF, (cnetz->sched_ts + 8) & 24);
} else {
/* switch next frame */

View File

@@ -10,7 +10,7 @@ typedef struct cnetz cnetz_t;
/* dsp modes of transmission */
enum dsp_mode {
DSP_SCHED_NONE = 0, /* use for sheduling: nothing to shedule */
DSP_SCHED_NONE = 0, /* use for scheduling: nothing to schedule */
DSP_MODE_OFF, /* send nothing on unused SpK */
DSP_MODE_OGK, /* send "Telegramm" on OgK */
DSP_MODE_SPK_K, /* send concentrated "Telegramm" SpK */

View File

@@ -94,7 +94,7 @@ int update_db(cnetz_t __attribute__((unused)) *cnetz, uint8_t futln_nat, uint8_t
{
cnetz_db_t *db, **dbp;
/* search transaction for this subsriber */
/* search transaction for this subscriber */
db = cnetz_db_head;
while (db) {
if (db->futln_nat == futln_nat

View File

@@ -118,7 +118,7 @@ int dsp_init_sender(cnetz_t *cnetz, int measure_speed, double clock_speed[2], en
}
if (clock_speed[0] > 1000 || clock_speed[0] < -1000 || clock_speed[1] > 1000 || clock_speed[1] < -1000) {
PDEBUG_CHAN(DDSP, DEBUG_ERROR, "Clock speed %.1f,%.1f ppm out of range! Plese use range between +-1000 ppm!\n", clock_speed[0], clock_speed[1]);
PDEBUG_CHAN(DDSP, DEBUG_ERROR, "Clock speed %.1f,%.1f ppm out of range! Please use range between +-1000 ppm!\n", clock_speed[0], clock_speed[1]);
return -EINVAL;
}
PDEBUG_CHAN(DDSP, DEBUG_INFO, "Using clock speed of %.1f ppm (RX) and %.1f ppm (TX) to correct sound card's clock.\n", clock_speed[0], clock_speed[1]);
@@ -136,7 +136,7 @@ int dsp_init_sender(cnetz_t *cnetz, int measure_speed, double clock_speed[2], en
goto error;
}
/* create devation and ramp */
/* create deviation and ramp */
cnetz->fsk_deviation = FSK_DEVIATION;
dsp_init_ramp(cnetz);
@@ -229,7 +229,7 @@ void calc_clock_speed(cnetz_t *cnetz, double samples, int tx, int result)
ti = get_time();
/* skip some time to avoid false mesurement due to filling of buffers */
/* skip some time to avoid false measurement due to filling of buffers */
if (cs->meas_ti == 0.0) {
cs->meas_ti = ti + 1.0;
return;
@@ -431,7 +431,7 @@ static int fsk_block_encode(cnetz_t *cnetz, const char *bits, int ogk)
* the marker is placed in the middle of the 6th bit.
* because we have a transition (ramp) in the middle of each bit.
* the phone will see the position of the marker as start of the 6th bit.
* the marker marks the pont where the speech is ramped up, so the phone
* the marker marks the point where the speech is ramped up, so the phone
* will see the speech completely ramped up after the 6th bit
*/
static int fsk_distributed_encode(cnetz_t *cnetz, const char *bits)
@@ -662,7 +662,7 @@ again:
if (cnetz->sched_dsp_mode_ts >= 0 && cnetz->sched_r_m == 0) {
if (cnetz->sched_dsp_mode_ts == cnetz->sched_ts) {
/* OgK / SpK(K) / SpK(V) */
PDEBUG_CHAN(DDSP, DEBUG_INFO, "Now switchting channel mode to %s at timeslot %d\n", cnetz_dsp_mode_name(cnetz->sched_dsp_mode), cnetz->sched_dsp_mode_ts);
PDEBUG_CHAN(DDSP, DEBUG_INFO, "Now switching channel mode to %s at timeslot %d\n", cnetz_dsp_mode_name(cnetz->sched_dsp_mode), cnetz->sched_dsp_mode_ts);
cnetz->sched_dsp_mode_ts = -1;
cnetz_set_dsp_mode(cnetz, cnetz->sched_dsp_mode);
}

View File

@@ -39,13 +39,13 @@
* 0-level of the phone's transmitter is. (level of carrier frequency) Also we
* use receiver and sound card that cause any level to return to 0 after some
* time, Even if the transmitter still transmits a level above or below the
* carrier frequnecy. Insted we look at the change of the received signal. An
* carrier frequnecy. Instead we look at the change of the received signal. An
* upward change indicates 1. An downward change indicates 0. (This may also be
* reversed, if we find out, that we received a sync sequence in reversed
* polarity.) If there is no significant change in level, we keep the value of
* last change, regardless of what level we actually receive.
*
* To determine a change from noise, we use a theshold. This is set to half of
* To determine a change from noise, we use a threshold. This is set to half of
* the level of last received change. This means that the next change may be
* down to a half lower. There is a special case during distributed signaling.
* The first level change of each data chunk raises or falls from 0-level
@@ -65,7 +65,7 @@
* determine the highest slope, the highest difference between subsequent
* samples is used. For every sample we move the window one bit to the right
* (next sample), check if change level matches the threshold and highest slope
* is in the middle and so forth. Only if the highes slope is exactly in the
* is in the middle and so forth. Only if the highest slope is exactly in the
* middle, we declare a change. This means that we detect a slope about half of
* a bit duration later.
*
@@ -342,12 +342,12 @@ static inline void got_bit(fsk_fm_demod_t *fsk, int bit, double change_level)
case FSK_SYNC_NONE:
fsk->rx_sync = (fsk->rx_sync << 1) | bit;
/* use half level of last change for threshold change detection.
* if there is no change detected for 5 bits, set theshold to
* if there is no change detected for 5 bits, set threshold to
* 1 percent, so the 7 pause bits before a frame will make sure
* that the change is below noise level, so the first sync
* bit is detected. then the change is set and adjusted
* for all other bits in the sync sequence.
* after sync, the theshold is set to half of the average of
* after sync, the threshold is set to half of the average of
* all changes in the sync sequence */
if (change_level > 0.0) {
fsk->level_threshold = change_level / 2.0;

View File

@@ -1,6 +1,6 @@
#define BITS_PER_SUPERFRAME 12672.0 /* super frame (Oberrahmen) has duration of excactly 2.4 seconds */
#define BITS_PER_BLOCK 198.0 /* block has duration of excactly 37.5 milli seconds */
#define BITS_PER_SUPERFRAME 12672.0 /* super frame (Oberrahmen) has duration of exactly 2.4 seconds */
#define BITS_PER_BLOCK 198.0 /* block has duration of exactly 37.5 milli seconds */
#define BITS_PER_SPK_BLOCK 66.0 /* spk block has a duration of exactly 12.5 milli seconds */
/* fsk rx sync state */

View File

@@ -103,7 +103,7 @@ void print_help(const char *arg0)
printf(" Power level 8 starts with level 6 and is then reduced on SpK.\n");
printf(" -A --authentication <challenge>\n");
printf(" Enable authorization flag on the base station and use given challenge\n");
printf(" as autorization random. Depending on the key inside the card you will\n");
printf(" as authorization random. Depending on the key inside the card you will\n");
printf(" get a response. Any response is accepted. Phone must have smart card!\n");
printf(" The challenge can be any 64 bit (hex) number like: 0x0123456789abcdef\n");
printf(" Note: Authentication is automatically enabled for the base station\n");

View File

@@ -1204,7 +1204,7 @@ int init_coding(void)
block_code[i] = word;
}
/* check if redunancy of a single bit matches the combined redundancy */
/* check if redundancy of a single bit matches the combined redundancy */
for (i = 0; i < 128; i++) {
int r = 0;
for (j = 0; j < 7; j++) {

View File

@@ -44,7 +44,7 @@ transaction_t *create_transaction(cnetz_t *cnetz, uint64_t state, uint8_t futln_
transaction_t *trans = NULL;
cnetz_t *search_cnetz;
/* search transaction for this subsriber */
/* search transaction for this subscriber */
for (sender = sender_head; sender; sender = sender->next) {
search_cnetz = (cnetz_t *) sender;
/* search transaction for this callref */
@@ -56,7 +56,7 @@ transaction_t *create_transaction(cnetz_t *cnetz, uint64_t state, uint8_t futln_
const char *rufnummer = transaction2rufnummer(trans);
int old_callref = trans->callref;
cnetz_t *old_cnetz = trans->cnetz;
PDEBUG(DTRANS, DEBUG_NOTICE, "Found alredy pending transaction for subscriber '%s', deleting!\n", rufnummer);
PDEBUG(DTRANS, DEBUG_NOTICE, "Found already pending transaction for subscriber '%s', deleting!\n", rufnummer);
destroy_transaction(trans);
if (old_cnetz) /* should be... */
cnetz_go_idle(old_cnetz);
@@ -261,7 +261,7 @@ static const char *trans_state_name(uint64_t state)
case TRANS_MT_DELAY:
return "MT_DELAY";
default:
return "<invald transaction state>";
return "<invalid transaction state>";
}
}
@@ -309,7 +309,7 @@ const char *trans_short_state_name(uint64_t state)
case TRANS_MT_DELAY:
return "IN QUEUE";
default:
return "<invald transaction state>";
return "<invalid transaction state>";
}
}

View File

@@ -13,7 +13,7 @@
#define TRANS_WBN (1 << 7) /* dialing received, waiting for time slot to reject call */
#define TRANS_VAG (1 << 8) /* establishment of call sent, switching channel */
/* mobile terminated call */
#define TRANS_WSK (1 << 9) /* incomming call in queue */
#define TRANS_WSK (1 << 9) /* incoming call in queue */
#define TRANS_VAK (1 << 10) /* establishment of call sent, switching channel */
/* traffic channel */
#define TRANS_BQ (1 << 11) /* accnowledge channel */