cleanup
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -6,9 +6,10 @@
|
||||
#ifndef ANIMATION_H
|
||||
#define ANIMATION_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "esp_err.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @brief Animation modes
|
||||
*/
|
||||
|
||||
@ -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 = {
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#define CONFIG_H
|
||||
|
||||
#include "esp_err.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
@ -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";
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#define CONTROL_H
|
||||
|
||||
#include "esp_err.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
/**
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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";
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user