~hmatuschek/+junk/qdmr-package

« back to all changes in this revision

Viewing changes to lib/gd77_codeplug.cc

  • Committer: Hannes Matuschek
  • Date: 2021-01-17 11:31:01 UTC
  • mfrom: (1.1.16)
  • Revision ID: hmatuschek@gmail.com-20210117113101-kgljfiub7x1db97a
* Bugfix release.
* AT-D878UV: Fixed GPS code-plug representation.
* AT-D878UV: Fixed channel encoding.
* All: Turned missing contacts in RX group lists to warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
GD77Codeplug::channel_t::clear() {
33
33
  memset(this, 0, sizeof(channel_t));
34
34
  memset(name, 0xff, 16);
 
35
  _unused25              = 0;
35
36
  _unused30              = 0x50;
 
37
  _unused36              = 0;
 
38
  tx_signaling_syst      = 0;
 
39
  _unused38              = 0;
 
40
  rx_signaling_syst      = 0;
36
41
  _unused40              = 0x16;
37
42
  privacy_group          = PRIVGR_NONE;
 
43
  emergency_system_index = 0;
 
44
  _unused48              = 0;
 
45
  emergency_alarm_ack    = 0;
 
46
  data_call_conf         = 0;
 
47
  private_call_conf      = 0;
 
48
  _unused49_1            = 0;
 
49
  privacy                = 0;
 
50
  _unused49_5            = 0;
 
51
  _unused49_7            = 0;
 
52
  dcdm                   = 0;
 
53
  _unused50_1            = 0;
 
54
  _unused50_6            = 0;
38
55
  squelch                = SQ_NORMAL;
39
56
  bandwidth              = BW_12_5_KHZ;
 
57
  talkaround             = 0;
 
58
  _unused51_4            = 0;
 
59
  vox                    = 0;
 
60
  _unused52              = 0;
40
61
}
41
62
 
42
63
double
217
238
GD77Codeplug::grouplist_t::linkRXGroupListObj(RXGroupList *lst, const CodeplugContext &ctx) const {
218
239
  for (int i=0; (i<32) && member[i]; i++) {
219
240
    if (! ctx.hasDigitalContact(member[i])) {
220
 
      logDebug() << "Cannot link RX group list '"<< lst->name() <<
 
241
      logWarn() << "Cannot link RX group list '"<< lst->name() <<
221
242
                    ": contact #" << member[i] << " is not defined.";
222
 
      return false;
 
243
      continue;
223
244
    }
224
245
    lst->addContact(ctx.getDigitalContact(member[i]));
225
246
  }
348
369
GD77Codeplug::contact_t::clear() {
349
370
  memset(name, 0xff, 16);
350
371
  memset(id, 0x00, 4);
351
 
  type = receive_tone = ring_style = valid = 0;
 
372
  type = receive_tone = ring_style = _unknown23 = 0;
352
373
}
353
374
 
354
375
bool
355
376
GD77Codeplug::contact_t::isValid() const {
356
 
  return (0x00 != valid) && (0x00 != name[0]) && (0xff != name[0]);
 
377
  return (0x00 != name[0]) && (0xff != name[0]);
357
378
}
358
379
 
359
380
uint32_t
393
414
void
394
415
GD77Codeplug::contact_t::fromContactObj(const DigitalContact *cont, const Config *conf) {
395
416
  Q_UNUSED(conf);
396
 
  valid = 0xff;
 
417
  _unknown23 = 0xff;
397
418
  setName(cont->name());
398
419
  setId(cont->number());
399
420
  switch (cont->type()) {