Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: AverageMCP3008 VoltageMonitor mbed-rtos mbed mcp3008
Fork of KIK01_Proto05 by
Diff: main.cpp
- Revision:
- 7:6735a343780e
- Parent:
- 6:897d6392b408
- Child:
- 8:bb34a4894337
diff -r 897d6392b408 -r 6735a343780e main.cpp
--- a/main.cpp Sun Jun 04 09:32:30 2017 +0000
+++ b/main.cpp Sun Jun 04 09:36:09 2017 +0000
@@ -160,7 +160,7 @@
amplitude = envelopeAmplitude.getAmplitude(envelopeTicks);
envelopeTicks++;
- if (envelopeTicks == envelopeLength) {
+ if (envelopeTicks >= envelopeLength) {
envelopeTicks = 0;
}
}
@@ -168,7 +168,7 @@
void update()
{
ticks++;
- if (ticks == SAMPLING_RATE / 1000) {
+ if (ticks >= SAMPLING_RATE / 1000) {
ticks = 0;
// set envelope parameters
