fix divisor<>freq computations, add q to lf tune

This commit is contained in:
Philippe Teuwen 2019-10-03 21:18:37 +02:00
commit df08e7970c
5 changed files with 55 additions and 28 deletions

View file

@ -29,7 +29,7 @@ sample_config config = { 1, 8, 1, LF_DIVISOR_125, 0, 0 } ;
void printConfig() {
uint32_t d = config.divisor;
DbpString(_BLUE_("LF Sampling config"));
Dbprintf(" [q] divisor.............%d ( "_GREEN_("%d.%02d kHz")")", d, 12000 / d, ((1200000 + d/2) / d) - ((12000 / d) * 100));
Dbprintf(" [q] divisor.............%d ( "_GREEN_("%d.%02d kHz")")", d, 12000 / (d+1), ((1200000 + (d+1)/2) / (d+1)) - ((12000 / (d+1)) * 100));
Dbprintf(" [b] bps.................%d", config.bits_per_sample);
Dbprintf(" [d] decimation..........%d", config.decimation);
Dbprintf(" [a] averaging...........%s", (config.averaging) ? "Yes" : "No");