This commit is contained in:
2026-01-06 11:09:59 +01:00
parent 25b2c028b6
commit 1012d3bb2f
15 changed files with 2127 additions and 19 deletions

2
.gitignore vendored
View File

@ -3,7 +3,6 @@
# https://github.com/espressif/esp-idf # https://github.com/espressif/esp-idf
build/ build/
sdkconfig
sdkconfig.old sdkconfig.old
# ---> VisualStudioCode # ---> VisualStudioCode
@ -187,7 +186,6 @@ cython_debug/
# https://github.com/espressif/esp-idf # https://github.com/espressif/esp-idf
build/ build/
sdkconfig
sdkconfig.old sdkconfig.old
# ---> CMake # ---> CMake

View File

@ -5,11 +5,12 @@
#include "animation.h" #include "animation.h"
#include "led.h" #include "led.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp_timer.h" #include "esp_timer.h"
#include "esp_random.h" #include "esp_random.h"
#include <math.h> #include <math.h>
#include <string.h>
static const char *TAG = "ANIMATION"; static const char *TAG = "ANIMATION";

View File

@ -6,9 +6,10 @@
#ifndef ANIMATION_H #ifndef ANIMATION_H
#define ANIMATION_H #define ANIMATION_H
#include <stdint.h>
#include "esp_err.h" #include "esp_err.h"
#include <stdint.h>
/** /**
* @brief Animation modes * @brief Animation modes
*/ */

View File

@ -11,7 +11,6 @@
#include "esp_system.h" #include "esp_system.h"
#include "nvs_flash.h" #include "nvs_flash.h"
#include "nvs.h" #include "nvs.h"
#include "esp_timer.h"
#include <string.h> #include <string.h>
@ -21,11 +20,13 @@ static const char *TAG = "CONFIG";
#define CONFIG_MAGIC 0xDEADBEEF #define CONFIG_MAGIC 0xDEADBEEF
#define HARDCODED_CONFIG #define HARDCODED_CONFIG
#ifdef HARDCODED_CONFIG
#define HARDCODED_CONFIG_LED_STRIP_A_PIN 12U #define HARDCODED_CONFIG_LED_STRIP_A_PIN 12U
#define HARDCODED_CONFIG_LED_STRIP_B_PIN 14U #define HARDCODED_CONFIG_LED_STRIP_B_PIN 14U
#define HARDCODED_CONFIG_LED_STRIP_A_COUNT 7U #define HARDCODED_CONFIG_LED_STRIP_A_COUNT 7U
#define HARDCODED_CONFIG_LED_STRIP_B_COUNT 7U #define HARDCODED_CONFIG_LED_STRIP_B_COUNT 7U
#define HARDCODED_CONFIG_PWM_PIN 13U #define HARDCODED_CONFIG_PWM_PIN 13U
#endif
// Global state // Global state
static config_t current_config = { static config_t current_config = {

View File

@ -7,6 +7,7 @@
#define CONFIG_H #define CONFIG_H
#include "esp_err.h" #include "esp_err.h"
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -13,10 +13,6 @@
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp_system.h"
#include "esp_timer.h"
#include <string.h>
static const char *TAG = "CONTROL"; static const char *TAG = "CONTROL";

View File

@ -7,6 +7,7 @@
#define CONTROL_H #define CONTROL_H
#include "esp_err.h" #include "esp_err.h"
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -4,10 +4,12 @@
*/ */
#include "led.h" #include "led.h"
#include "driver/rmt_tx.h" #include "driver/rmt_tx.h"
#include "esp_log.h" #include "esp_log.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -6,9 +6,10 @@
#ifndef LED_H #ifndef LED_H
#define LED_H #define LED_H
#include <stdint.h>
#include "esp_err.h" #include "esp_err.h"
#include <stdint.h>
#define LED_STRIP_MAX_LEDS 100 // Maximum LEDs per strip #define LED_STRIP_MAX_LEDS 100 // Maximum LEDs per strip
/** /**

View File

@ -4,12 +4,14 @@
*/ */
#include "localbtn.h" #include "localbtn.h"
#include "driver/gpio.h" #include "driver/gpio.h"
#include "esp_timer.h" #include "esp_timer.h"
#include "esp_log.h" #include "esp_log.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "soc/gpio_num.h" #include "soc/gpio_num.h"
#include <string.h> #include <string.h>
static const char *TAG = "LOCALBTN"; static const char *TAG = "LOCALBTN";

View File

@ -6,9 +6,10 @@
#ifndef LOCALBTN_H #ifndef LOCALBTN_H
#define LOCALBTN_H #define LOCALBTN_H
#include "esp_err.h"
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include "esp_err.h"
/** /**
* @brief Callback function type for mode changes * @brief Callback function type for mode changes

View File

@ -3,15 +3,16 @@
* @brief Main application entry point for LED Controller * @brief Main application entry point for LED Controller
*/ */
#include <stdio.h> #include "control.h"
#include "animation.h"
#include "led.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp_system.h" #include "esp_system.h"
#include "control.h" #include <stdio.h>
#include "animation.h"
#include "led.h"
static const char *TAG = "MAIN"; static const char *TAG = "MAIN";

View File

@ -4,19 +4,20 @@
*/ */
#include "rcsignal.h" #include "rcsignal.h"
#include "driver/gpio.h" #include "driver/gpio.h"
#include "esp_timer.h" #include "esp_timer.h"
#include "esp_log.h" #include "esp_log.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"
#include <string.h> #include <string.h>
static const char *TAG = "RCSIGNAL"; static const char *TAG = "RCSIGNAL";
#define MAX_MODES 14 #define MAX_MODES 14 //TODO: Get from config
#define PULSE_THRESHOLD_US 1500 #define PULSE_THRESHOLD_US 1500
#define SIGNAL_TIMEOUT_MS 100 #define SIGNAL_TIMEOUT_MS 100
static struct static struct
{ {
int8_t gpio_pin; int8_t gpio_pin;

View File

@ -6,9 +6,10 @@
#ifndef RCSIGNAL_H #ifndef RCSIGNAL_H
#define RCSIGNAL_H #define RCSIGNAL_H
#include "esp_err.h"
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include "esp_err.h"
/** /**
* @brief Callback function type for mode changes * @brief Callback function type for mode changes

2100
sdkconfig Normal file

File diff suppressed because it is too large Load Diff