MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / pcr_set_level_cmd

Function pcr_set_level_cmd

rigs/pcr/pcr.c:1410–1434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1408}
1409
1410static int
1411pcr_set_level_cmd(RIG *rig, const char *base, int level)
1412{
1413 char buf[12];
1414
1415 rig_debug(RIG_DEBUG_TRACE, "%s: base is %s, level is %d\n",
1416 __func__, base, level);
1417
1418 if (level < 0x0)
1419 {
1420 rig_debug(RIG_DEBUG_ERR, "%s: too low: %d\n",
1421 __func__, level);
1422 return -RIG_EINVAL;
1423 }
1424 else if (level > 0xff)
1425 {
1426 rig_debug(RIG_DEBUG_ERR, "%s: too high: %d\n",
1427 __func__, level);
1428 return -RIG_EINVAL;
1429 }
1430
1431 SNPRINTF(buf, 12, "%s%02X", base, level);
1432 buf[11] = '\0';
1433 return pcr_transaction(rig, buf);
1434}
1435
1436/*
1437 * Sets the volume of the rig to the level specified in the level integer.

Callers 15

pcr_set_volumeFunction · 0.85
pcr_set_squelchFunction · 0.85
pcr_set_if_shiftFunction · 0.85
pcr_set_agcFunction · 0.85
pcr_set_afcFunction · 0.85
pcr_set_nbFunction · 0.85
pcr_set_anlFunction · 0.85
pcr_set_diversityFunction · 0.85
pcr_set_attenuatorFunction · 0.85
pcr_set_bfo_shiftFunction · 0.85
pcr_set_dspFunction · 0.85
pcr_set_dsp_stateFunction · 0.85

Calls 2

rig_debugFunction · 0.85
pcr_transactionFunction · 0.85

Tested by

no test coverage detected