From 3d476bf1c2ce9f60346e05feac6e0d0a9eeb92c2 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 7 Mar 2018 21:32:24 -0800 Subject: [PATCH] Remove default argument from function definition Default arguments should only be specified in function prototypes, not in the function definition. This caused compilation of the library to fail for Arduino AVR Boards 1.6.11 or earlier. It does not cause compilation to fail for Arduino AVR Boards 1.6.12 and newer only because the -fpermissive compiler flag was added, which downgrades this to an error. It has been stated that flag may be removed in the future: https://github.com/arduino/ArduinoCore-avr/commit/06868f4cd39a9dba82b5014d1208feb1e1f0d750 So this change is necessary for both backwards and forwards compatibility. Even with current versions it fixes a warning, which is always wise to do. --- src/DDS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DDS.cpp b/src/DDS.cpp index 01b49c1..8a33d98 100644 --- a/src/DDS.cpp +++ b/src/DDS.cpp @@ -45,7 +45,7 @@ void DDS::stop() { TCCR2B = 0; } -void DDS::startPhaseAccumulator(bool use_only_timer_2 = false){ +void DDS::startPhaseAccumulator(bool use_only_timer_2){ timer2only = use_only_timer_2; if(timer2only){