Skip to content
Snippets Groups Projects
Commit 94b80335 authored by Matthew's avatar Matthew
Browse files

remove default arguments from implementation

parent fc7880b4
No related branches found
No related tags found
3 merge requests!4Joe merge,!3Doxygen Documentation,!2Docs
#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
......
#include "PotentiometerBehaviours.h"
PotentiometerUpdated::PotentiometerUpdated(VizBlocks* node, String name = "PotentiometerUpdated") :
PotentiometerUpdated::PotentiometerUpdated(VizBlocks* node, String name) :
Behaviour(name), _node(node)
{ }
......
#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);
......
#include "RotaryEncoderBehaviours.h"
RotaryEncoderUpdated::RotaryEncoderUpdated(VizBlocks* node, String name = "RotaryEncoderUpdated") :
RotaryEncoderUpdated::RotaryEncoderUpdated(VizBlocks* node, String name) :
Behaviour(name), _node(node)
{ }
......
#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)
......
#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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment