Skip to content
Snippets Groups Projects
Commit c3fe4fd0 authored by Jens Nolte's avatar Jens Nolte
Browse files

Move headers to `qthing/` path and move envronment

parent 69627ae1
No related branches found
No related tags found
1 merge request!16Merge dev branch into master
Showing
with 24 additions and 15 deletions
...@@ -14,4 +14,4 @@ sdkconfig.old ...@@ -14,4 +14,4 @@ sdkconfig.old
# This directory contains user-specific environment configurations # This directory contains user-specific environment configurations
/environments/* /environments/*
# Ignore symlink to current environment # Ignore symlink to current environment
/qthing/include/environment.h /generated/environment.h
...@@ -4,4 +4,5 @@ cmake_minimum_required(VERSION 3.5) ...@@ -4,4 +4,5 @@ cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake) include($ENV{IDF_PATH}/tools/cmake/project.cmake)
idf_build_component(qthing) idf_build_component(qthing)
idf_build_component(generated)
project(qthing) project(qthing)
...@@ -12,9 +12,9 @@ function list_known_environments { ...@@ -12,9 +12,9 @@ function list_known_environments {
} }
function link_environment { function link_environment {
echo "Linking qthing/include/environment.h to $1" echo "Linking generated/environment.h to $1"
ln -snf "$1" "${QTHING_PATH:-.}/qthing/include/environment.h" ln -snf "$1" "${QTHING_PATH:-.}/generated/environment.h"
touch --no-create "${QTHING_PATH:-.}/qthing/include/environment.h" touch --no-create "${QTHING_PATH:-.}/generated/environment.h"
} }
if [[ -z "$1" ]]; then if [[ -z "$1" ]]; then
...@@ -23,7 +23,7 @@ if [[ -z "$1" ]]; then ...@@ -23,7 +23,7 @@ if [[ -z "$1" ]]; then
elif [[ -f "$1" && "$1" == *.h ]]; then elif [[ -f "$1" && "$1" == *.h ]]; then
link_environment "$1" link_environment "$1"
elif [[ -f "${QTHING_PATH:-.}/environments/$1.h" ]]; then elif [[ -f "${QTHING_PATH:-.}/environments/$1.h" ]]; then
link_environment "../../environments/$1.h" link_environment "../environments/$1.h"
else else
echo "Cannot find environment config in the following locations:" echo "Cannot find environment config in the following locations:"
echo "$1" echo "$1"
......
idf_component_register(
INCLUDE_DIRS
"."
)
...@@ -7,15 +7,19 @@ idf_component_register( ...@@ -7,15 +7,19 @@ idf_component_register(
INCLUDE_DIRS INCLUDE_DIRS
"include" "include"
"magic-include"
REQUIRES REQUIRES
ESP32-Digital-RGB-LED-Drivers ESP32-Digital-RGB-LED-Drivers
LiquidCrystal LiquidCrystal
app_update app_update
arduino-esp32 arduino-esp32
generated
main main
mqtt mqtt
nvs_flash nvs_flash
rc-switch rc-switch
) )
component_compile_options(-std=c++17) component_compile_options(-std=c++17)
component_compile_options(-fdiagnostics-color=always)
component_compile_options(-Wall)
#include <cmath> #include <cmath>
#include "qthing_legacy.hpp" #include "qthing/qthing_legacy.hpp"
namespace qthing { namespace qthing {
// TODO: should return RGB once that can be casted to RGBW // TODO: should return RGB once that can be casted to RGBW
......
#include "error.hpp" #include "qthing/error.hpp"
void qthing::errorCodeToException(esp_err_t errorNumber) { void qthing::errorCodeToException(esp_err_t errorNumber) {
if (errorNumber != ESP_OK) { if (errorNumber != ESP_OK) {
......
#include "event.hpp" #include "qthing/event.hpp"
#include "qthing_legacy.hpp" #include "qthing/qthing_legacy.hpp"
namespace qthing { namespace qthing {
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
#define QTHING_HIDE_PRIVATE_API #define QTHING_HIDE_PRIVATE_API
#include "error.hpp" #include "qthing/error.hpp"
#include "network.hpp" #include "qthing/network.hpp"
#include "power.hpp" #include "qthing/power.hpp"
#include "qthing_legacy.hpp" #include "qthing/qthing_legacy.hpp"
#include "time.hpp" #include "qthing/time.hpp"
#include "util.hpp" #include "qthing/util.hpp"
#undef QTHING_HIDE_PRIVATE_API #undef QTHING_HIDE_PRIVATE_API
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
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