diff --git a/projects/rfdsatt/attenuator.c b/projects/rfdsatt/attenuator.c index bea3514..937df09 100644 --- a/projects/rfdsatt/attenuator.c +++ b/projects/rfdsatt/attenuator.c @@ -68,6 +68,10 @@ int attenuator_set(uint8_t channel, uint8_t stage, uint8_t val_qdb) if (val > 0x1f) return -ERANGE; + /* the DAT-31A-SP actually has a B0 which works in half-dB steps, + * but according to the manual it must alsays be 0 */ + val = val * 2; + /* The shift register should be loaded while LE is held low to * prevent the attenuator value from changing as data is * entered */