Skip to content

Commit

Permalink
Merge pull request #100 from makermelissa/master
Browse files Browse the repository at this point in the history
Fix compiler warning for oscillator example
  • Loading branch information
makermelissa authored Mar 28, 2024
2 parents ff2457a + 7ee072e commit da74cb9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/oscillator/oscillator.ino
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ uint32_t multiplier = 4096;
volatile uint16_t interruptCounter = 0;

ICACHE_RAM_ATTR void handleInterrupt() {
interruptCounter++;
interruptCounter = interruptCounter + 1;
}

void setup() {
Expand Down Expand Up @@ -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;
Expand All @@ -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);
}
}

Expand Down

0 comments on commit da74cb9

Please sign in to comment.