Skip to content

Commit 1022b87

Browse files
committed
Add copyright headers and version info
1 parent c10cf1f commit 1022b87

17 files changed

Lines changed: 279 additions & 1 deletion

changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
V 1.0.0
2+
* Initial release
3+
* Light mode
4+
* Animation mode
5+
* Alarm clock playing Animation

src/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ add_executable(${APPLICATION_NAME}
3636
${PROJECT_SOURCES}
3737
)
3838

39+
target_compile_definitions(${APPLICATION_NAME} PUBLIC
40+
-DVER_MAJOR=${PROJECT_VERSION_MAJOR}
41+
-DVER_MINOR=${PROJECT_VERSION_MINOR}
42+
-DVER_STEP=${PROJECT_VERSION_PATCH}
43+
-DAPPLICATION_NAME=${PROJECT_NAME}
44+
)
45+
3946
target_link_libraries(${APPLICATION_NAME}
4047
PUBLIC
4148
ASIO::ASIO

src/alarm.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/**********************************************************************************************
2+
Copyright (C) 2022 Oliver Eichler <oliver.eichler@gmx.de>
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
**********************************************************************************************/
118
#include "alarm.hpp"
219

320
#include <chrono>

src/alarm.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/**********************************************************************************************
2+
Copyright (C) 2022 Oliver Eichler <oliver.eichler@gmx.de>
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
**********************************************************************************************/
118
#ifndef SRC_ALARM_HPP
219
#define SRC_ALARM_HPP
320

src/animation.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/**********************************************************************************************
2+
Copyright (C) 2022 Oliver Eichler <oliver.eichler@gmx.de>
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
**********************************************************************************************/
118
#include "animation.hpp"
219

320
#include <filesystem>

src/animation.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/**********************************************************************************************
2+
Copyright (C) 2022 Oliver Eichler <oliver.eichler@gmx.de>
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
**********************************************************************************************/
118
#ifndef SRC_ANIMATION_HPP
219
#define SRC_ANIMATION_HPP
320

src/controller.cpp

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/**********************************************************************************************
2+
Copyright (C) 2022 Oliver Eichler <oliver.eichler@gmx.de>
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
**********************************************************************************************/
118
#include "controller.hpp"
219

320
#include <fmt/format.h>
@@ -13,15 +30,26 @@
1330
constexpr const char* kConfigFile = "config.json";
1431
constexpr const char* kConfigPath = "/home/pi/.config/led_control/";
1532

33+
#ifndef _MKSTR_1
34+
#define _MKSTR_1(x) #x
35+
#define _MKSTR(x) _MKSTR_1(x)
36+
#endif
37+
38+
#define VER_STR _MKSTR(VER_MAJOR) "." _MKSTR (VER_MINOR) "." _MKSTR (VER_STEP)
39+
#define WHAT_STR _MKSTR(APPLICATION_NAME) ", Version " VER_STR
40+
41+
1642
Controller::Controller() : Log("ctrl")
1743
{
44+
I(fmt::format("-------------- {} --------------", WHAT_STR));
45+
1846
memset(&ledstring, 0, sizeof (ledstring));
1947
ledstring.freq = TARGET_FREQ;
2048
ledstring.dmanum = DMA;
2149
ledstring.channel[0].gpionum = GPIO_PIN;
2250
ledstring.channel[0].count = LED_COUNT;
2351
ledstring.channel[0].invert = 0;
24-
ledstring.channel[0].brightness = 255;
52+
ledstring.channel[0].brightness = 100;
2553
ledstring.channel[0].strip_type = STRIP_TYPE;
2654

2755
const std::filesystem::path path{kConfigPath};

src/controller.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/**********************************************************************************************
2+
Copyright (C) 2022 Oliver Eichler <oliver.eichler@gmx.de>
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
**********************************************************************************************/
118
#ifndef SRC_CONTROLER_HPP
219
#define SRC_CONTROLER_HPP
320

src/light.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/**********************************************************************************************
2+
Copyright (C) 2022 Oliver Eichler <oliver.eichler@gmx.de>
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
**********************************************************************************************/
118
#include "light.hpp"
219

320
#include <fmt/format.h>

src/light.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/**********************************************************************************************
2+
Copyright (C) 2022 Oliver Eichler <oliver.eichler@gmx.de>
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
**********************************************************************************************/
118
#ifndef SRC_LIGHT_HPP
219
#define SRC_LIGHT_HPP
320

0 commit comments

Comments
 (0)