statistics output

This commit is contained in:
Wolfgang Hottgenroth
2019-11-04 13:11:42 +01:00
parent 69de431c1f
commit fabdab43ca
2 changed files with 7 additions and 1 deletions

View File

@ -22,6 +22,9 @@ config_t cfg;
const char EPSILON_KEY[] = "epsilon";
const double DEFAULT_EPSILON = 0.01;
uint32_t skipped = 0;
void isr() {
static uint32_t lastCounter = 0;
@ -85,6 +88,7 @@ int main (void) {
if (settled && (abs(f - lastF) > epsilon)) {
printf("Current f=%f, last f=%f, gradient too large, skipped\n", f, lastF);
skipped++;
f = lastF;
}
lastF = f;