transform/scale: Support SR_DF_ANALOG2.
This commit is contained in:
parent
2d237f3ce8
commit
b1aa4f34bc
|
@ -50,6 +50,7 @@ static int receive(const struct sr_transform *t,
|
|||
{
|
||||
struct context *ctx;
|
||||
const struct sr_datafeed_analog *analog;
|
||||
const struct sr_datafeed_analog2 *analog2;
|
||||
struct sr_channel *ch;
|
||||
GSList *l;
|
||||
float *fdata;
|
||||
|
@ -75,6 +76,11 @@ static int receive(const struct sr_transform *t,
|
|||
}
|
||||
}
|
||||
break;
|
||||
case SR_DF_ANALOG2:
|
||||
analog2 = packet_in->payload;
|
||||
analog2->encoding->scale.p *= ctx->factor.p;
|
||||
analog2->encoding->scale.q *= ctx->factor.q;
|
||||
break;
|
||||
default:
|
||||
sr_spew("Unsupported packet type %d, ignoring.", packet_in->type);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue