From 94b803350d62bc7aa68df0517871afdf76a3f0f4 Mon Sep 17 00:00:00 2001 From: Matthew <mhamilton942@gmail.com> Date: Fri, 22 May 2020 15:40:13 +0100 Subject: [PATCH] remove default arguments from implementation --- src/Potentiometer.cpp | 2 +- src/PotentiometerBehaviours.cpp | 2 +- src/RotaryEncoder.cpp | 2 +- src/RotaryEncoderBehaviours.cpp | 2 +- src/ServoBehaviours.cpp | 6 +++--- src/VizBlocks.cpp | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Potentiometer.cpp b/src/Potentiometer.cpp index c32805d..f7cdcdd 100644 --- a/src/Potentiometer.cpp +++ b/src/Potentiometer.cpp @@ -1,6 +1,6 @@ #include "Potentiometer.h" -Potentiometer::Potentiometer(int pin, int id = 99) : _pin(pin), _id(id) +Potentiometer::Potentiometer(int pin, int id) : _pin(pin), _id(id) { pinMode(pin, INPUT); EMA_S = analogRead(_pin); //set EMA S for t=1 diff --git a/src/PotentiometerBehaviours.cpp b/src/PotentiometerBehaviours.cpp index cb4f8dd..711a260 100644 --- a/src/PotentiometerBehaviours.cpp +++ b/src/PotentiometerBehaviours.cpp @@ -1,6 +1,6 @@ #include "PotentiometerBehaviours.h" -PotentiometerUpdated::PotentiometerUpdated(VizBlocks* node, String name = "PotentiometerUpdated") : +PotentiometerUpdated::PotentiometerUpdated(VizBlocks* node, String name) : Behaviour(name), _node(node) { } diff --git a/src/RotaryEncoder.cpp b/src/RotaryEncoder.cpp index 5941755..ec9722c 100644 --- a/src/RotaryEncoder.cpp +++ b/src/RotaryEncoder.cpp @@ -1,6 +1,6 @@ #include "RotaryEncoder.h" -RotaryEncoder::RotaryEncoder(int pinA, int pinB, int id = 99) : _pinA(pinA), _pinB(pinB), _id(id) +RotaryEncoder::RotaryEncoder(int pinA, int pinB, int id) : _pinA(pinA), _pinB(pinB), _id(id) { pinMode(_pinA, INPUT_PULLUP); pinMode(_pinB, INPUT_PULLUP); diff --git a/src/RotaryEncoderBehaviours.cpp b/src/RotaryEncoderBehaviours.cpp index 5ce51b4..b3247a0 100644 --- a/src/RotaryEncoderBehaviours.cpp +++ b/src/RotaryEncoderBehaviours.cpp @@ -1,6 +1,6 @@ #include "RotaryEncoderBehaviours.h" -RotaryEncoderUpdated::RotaryEncoderUpdated(VizBlocks* node, String name = "RotaryEncoderUpdated") : +RotaryEncoderUpdated::RotaryEncoderUpdated(VizBlocks* node, String name) : Behaviour(name), _node(node) { } diff --git a/src/ServoBehaviours.cpp b/src/ServoBehaviours.cpp index 1716df6..e044f92 100644 --- a/src/ServoBehaviours.cpp +++ b/src/ServoBehaviours.cpp @@ -1,6 +1,6 @@ #include "ServoBehaviours.h" -ServoRotateReturn(Servo servo, String name="ServoRotateReturn", int delay=30, int pause=500, int start_angle = 2, int end_angle=178 ) : +ServoRotateReturn(Servo servo, String name, int delay, int pause, int start_angle, int end_angle) : Behaviour(name), _servo(servo),_delay(delay), _pause(pause), _start_angle(start_angle), _end_angle(end_angle) {} @@ -53,7 +53,7 @@ String ServoGoto::start(String args) return ""; }; -ServoGoto::ServoGoto(Servo servo, String name = "ServoGoto") : Behaviour(name), _servo(servo) +ServoGoto::ServoGoto(Servo servo, String name) : Behaviour(name), _servo(servo) {} char * ServoGoto::args() @@ -82,7 +82,7 @@ void ServoWiggle::update() } }; -ServoWiggle::ServoWiggle(Servo servo, String name = "ServoWiggle", int slowness=3) : Behaviour(name), _servo(servo),_wiggle_factor(slowness) +ServoWiggle::ServoWiggle(Servo servo, String name, int slowness) : Behaviour(name), _servo(servo),_wiggle_factor(slowness) {} String ServoWiggle::start(String args) diff --git a/src/VizBlocks.cpp b/src/VizBlocks.cpp index 19c27a7..b9d6e04 100644 --- a/src/VizBlocks.cpp +++ b/src/VizBlocks.cpp @@ -1,7 +1,7 @@ #include "VizBlocks.h" -VizBlocks(char* id, char* ssid="VizBlocksNet", char* wifi_pass="VizBlocksAP", - char* server="172.20.10.8",int port=1883) : _id(id), _server(server), _port(port), _ssid(ssid), _wifi_pass(wifi_pass) +VizBlocks(char* id, char* ssid, char* wifi_pass, + char* server, int port) : _id(id), _server(server), _port(port), _ssid(ssid), _wifi_pass(wifi_pass) {}; void VizBlocks::add(Behaviour *b) -- GitLab