WIP: feature/esp32-ng-basic #1

Draft
localhorst wants to merge 27 commits from feature/esp32-ng-basic into master
15 changed files with 2127 additions and 19 deletions
Showing only changes of commit 1012d3bb2f - Show all commits
-2
View File
@@ -3,7 +3,6 @@
# https://github.com/espressif/esp-idf
build/
sdkconfig
sdkconfig.old
# ---> VisualStudioCode
@@ -187,7 +186,6 @@ cython_debug/
# https://github.com/espressif/esp-idf
build/
sdkconfig
sdkconfig.old
# ---> CMake
+3 -2
View File
@@ -5,16 +5,17 @@
#include "animation.h"
#include "led.h"
#include "esp_log.h"
#include "esp_timer.h"
#include "esp_random.h"
#include <math.h>
#include <string.h>
static const char *TAG = "ANIMATION";
#define FRAMES_PER_SECOND 60
#define NUM_LEDS_DEFAULT 44 //TODO: Default from proof-of-concept
#define NUM_LEDS_DEFAULT 44 // TODO: Default from proof-of-concept
static animation_mode_t current_mode = ANIM_BLACK;
static uint8_t global_hue = 0;
+2 -1
View File
@@ -6,9 +6,10 @@
#ifndef ANIMATION_H
#define ANIMATION_H
#include <stdint.h>
#include "esp_err.h"
#include <stdint.h>
/**
* @brief Animation modes
*/
+2 -1
View File
@@ -11,7 +11,6 @@
#include "esp_system.h"
#include "nvs_flash.h"
#include "nvs.h"
#include "esp_timer.h"
#include <string.h>
@@ -21,11 +20,13 @@ static const char *TAG = "CONFIG";
#define CONFIG_MAGIC 0xDEADBEEF
#define HARDCODED_CONFIG
#ifdef HARDCODED_CONFIG
#define HARDCODED_CONFIG_LED_STRIP_A_PIN 12U
#define HARDCODED_CONFIG_LED_STRIP_B_PIN 14U
#define HARDCODED_CONFIG_LED_STRIP_A_COUNT 7U
#define HARDCODED_CONFIG_LED_STRIP_B_COUNT 7U
#define HARDCODED_CONFIG_PWM_PIN 13U
#endif
// Global state
static config_t current_config = {
+1
View File
@@ -7,6 +7,7 @@
#define CONFIG_H
#include "esp_err.h"
#include <stdint.h>
#include <stdbool.h>
-4
View File
@@ -13,10 +13,6 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "esp_system.h"
#include "esp_timer.h"
#include <string.h>
static const char *TAG = "CONTROL";
+1
View File
@@ -7,6 +7,7 @@
#define CONTROL_H
#include "esp_err.h"
#include <stdint.h>
#include <stdbool.h>
+2
View File
@@ -4,10 +4,12 @@
*/
#include "led.h"
#include "driver/rmt_tx.h"
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include <string.h>
#include <stdlib.h>
+2 -1
View File
@@ -6,9 +6,10 @@
#ifndef LED_H
#define LED_H
#include <stdint.h>
#include "esp_err.h"
#include <stdint.h>
#define LED_STRIP_MAX_LEDS 100 // Maximum LEDs per strip
/**
+2
View File
@@ -4,12 +4,14 @@
*/
#include "localbtn.h"
#include "driver/gpio.h"
#include "esp_timer.h"
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "soc/gpio_num.h"
#include <string.h>
static const char *TAG = "LOCALBTN";
+2 -1
View File
@@ -6,9 +6,10 @@
#ifndef LOCALBTN_H
#define LOCALBTN_H
#include "esp_err.h"
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
/**
* @brief Callback function type for mode changes
+5 -4
View File
@@ -3,15 +3,16 @@
* @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/task.h"
#include "esp_log.h"
#include "esp_system.h"
#include "control.h"
#include "animation.h"
#include "led.h"
#include <stdio.h>
static const char *TAG = "MAIN";
+3 -2
View File
@@ -4,19 +4,20 @@
*/
#include "rcsignal.h"
#include "driver/gpio.h"
#include "esp_timer.h"
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include <string.h>
static const char *TAG = "RCSIGNAL";
#define MAX_MODES 14
#define MAX_MODES 14 //TODO: Get from config
#define PULSE_THRESHOLD_US 1500
#define SIGNAL_TIMEOUT_MS 100
static struct
{
int8_t gpio_pin;
+2 -1
View File
@@ -6,9 +6,10 @@
#ifndef RCSIGNAL_H
#define RCSIGNAL_H
#include "esp_err.h"
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
/**
* @brief Callback function type for mode changes
+2100
View File
File diff suppressed because it is too large Load Diff