From a304b29befbfeaf5181a36b048decf4c0b3ca853 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Wed, 27 Mar 2024 13:45:55 -0700 Subject: [PATCH 1/2] Fix compiler warning for oscillator example --- examples/oscillator/oscillator.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/oscillator/oscillator.ino b/examples/oscillator/oscillator.ino index cc0aca4..7ea9a5b 100644 --- a/examples/oscillator/oscillator.ino +++ b/examples/oscillator/oscillator.ino @@ -56,7 +56,7 @@ uint32_t multiplier = 4096; volatile uint16_t interruptCounter = 0; ICACHE_RAM_ATTR void handleInterrupt() { - interruptCounter++; + interruptCounter = interruptCounter + 1; } void setup() { @@ -86,7 +86,7 @@ void loop() { { // first freeze counters and adjust for new round frozenCounter = interruptCounter; // first freeze counter - interruptCounter -= frozenCounter; + interruptCounter = interruptCounter - frozenCounter; lastEvaluation += INTERVAL; totalCounter += frozenCounter; @@ -108,10 +108,10 @@ void loop() { countDeviations++; Serial.printf("%4u", countDeviations); - Serial.printf(" Timestamp: %4u ", totalTime); + Serial.printf(" Timestamp: %4" PRIu32 " ", totalTime); Serial.printf(" Freq: %4u ", frozenCounter); - Serial.printf(" Counter: %6u ", totalCounter); - Serial.printf(" calc.osci.freq: %9u\n",realOsciFreq); + Serial.printf(" Counter: %6" PRIu32 " ", totalCounter); + Serial.printf(" calc.osci.freq: %9" PRIu32 "\n",realOsciFreq); } } From 7ee072e74fbd3727365ade36ac9608e41684a06b Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Wed, 27 Mar 2024 13:47:05 -0700 Subject: [PATCH 2/2] force actions to run