0.1.3 HeartBeat

This commit is contained in:
rob tillaart 2021-05-28 13:30:27 +02:00
parent 9be2ddb18a
commit d3e660a1c9
9 changed files with 20 additions and 9 deletions

View File

@ -1,7 +1,7 @@
//
// FILE: HeartBeat.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.1.2
// VERSION: 0.1.3
// PURPOSE: Arduino library for HeartBeat with frequency and dutyCycle
// DATE: 2019-06-12
// URL: https://github.com/RobTillaart/HeartBeat
@ -11,6 +11,7 @@
// 0.1.1 2020-12-24 arduino-CI
// 0.1.2 2021-01-15 renamed all to HeartBeat
// added dutyCycle
// 0.1.3 2021-05-27 fix arduino-lint
#include "HeartBeat.h"
@ -46,6 +47,7 @@ void HeartBeat::setDutyCycle(float dutyCycle)
_setFreqDuty();
}
void HeartBeat::beat()
{
static uint8_t state = LOW;

View File

@ -2,7 +2,7 @@
//
// FILE: HeartBeat.h
// AUTHOR: Rob Tillaart
// VERSION: 0.1.2
// VERSION: 0.1.3
// PURPOSE: Arduino library for HeartBeat with frequency and dutyCycle
// DATE: 2019-06-12
// URL: https://github.com/RobTillaart/HeartBeat
@ -10,7 +10,7 @@
#include "Arduino.h"
#define HEARTBEAT_LIB_VERSION (F("0.1.2"))
#define HEARTBEAT_LIB_VERSION (F("0.1.3"))
class HeartBeat
{
@ -21,7 +21,6 @@ public:
void setFrequency(float frequency = 1.0);
void setDutyCycle(float dutyCycle = 50);
inline void enable() { _running = true; };
inline void disable() { _running = false; };
@ -41,4 +40,5 @@ protected:
uint8_t _pin;
};
// -- END OF FILE --

View File

@ -30,4 +30,5 @@ void loop()
// do other stuff here
}
// -- END OF FILE --
// -- END OF FILE --

View File

@ -37,4 +37,5 @@ void loop()
// do other stuff here
}
// -- END OF FILE --

View File

@ -11,6 +11,7 @@ HeartBeat HB;
int frequency = 1;
void setup()
{
Serial.begin(115200);
@ -31,4 +32,5 @@ void loop()
// do other stuff here
}
// -- END OF FILE --
// -- END OF FILE --

View File

@ -3,6 +3,7 @@
# Datatypes (KEYWORD1)
HeartBeat KEYWORD1
# Methods and Functions (KEYWORD2)
begin KEYWORD2
setFrequency KEYWORD2
@ -11,5 +12,6 @@ enable KEYWORD2
disable KEYWORD2
beat KEYWORD2
# Constants (LITERAL1)
HEARTBEAT_LIB_VERSION LITERAL1

View File

@ -15,7 +15,8 @@
"type": "git",
"url": "https://github.com/RobTillaart/HeartBeat.git"
},
"version":"0.1.2",
"version": "0.1.3",
"license": "MIT",
"frameworks": "arduino",
"platforms": "*"
}

View File

@ -1,10 +1,10 @@
name=HeartBeat
version=0.1.2
version=0.1.3
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for HeartBeat with frequency and dutyCycle.
paragraph=blinking led by frequent polling.
category=Uncategorized
category=Other
url=https://github.com/RobTillaart/HeartBeat
architectures=*
includes=HeartBeat.h

View File

@ -41,6 +41,7 @@ unittest_setup()
{
}
unittest_teardown()
{
}
@ -77,6 +78,7 @@ unittest(test_constructor)
}
}
unittest_main()
// --------