From 1c1b855fd15716cab22fbe58708b80958a5a257e Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Sun, 12 Nov 2023 12:15:17 +0000 Subject: [PATCH] Fix circular and redundant imports + last freertos --- applications/external/brainfuck/worker.h | 2 ++ applications/external/flizzer_tracker/init_deinit.h | 3 --- applications/external/flizzer_tracker/input_event.h | 2 -- .../flizzer_tracker/tracker_engine/do_effects.h | 2 ++ applications/external/unitemp/sensors/BME680.h | 5 ++--- applications/external/unitemp/sensors/BMP180.c | 4 ++-- applications/external/unitemp/sensors/SCD30.c | 6 ------ applications/external/unitemp/sensors/SCD40.c | 10 ++-------- .../external/wifi_deauther/wifi_deauther_uart.c | 1 + 9 files changed, 11 insertions(+), 24 deletions(-) diff --git a/applications/external/brainfuck/worker.h b/applications/external/brainfuck/worker.h index b12e364c3..ba7043c9f 100644 --- a/applications/external/brainfuck/worker.h +++ b/applications/external/brainfuck/worker.h @@ -1,3 +1,5 @@ +#pragma once + #include "brainfuck_i.h" void initWorker(BFApp* application); diff --git a/applications/external/flizzer_tracker/init_deinit.h b/applications/external/flizzer_tracker/init_deinit.h index ebc80f9be..55e029d68 100644 --- a/applications/external/flizzer_tracker/init_deinit.h +++ b/applications/external/flizzer_tracker/init_deinit.h @@ -3,9 +3,6 @@ #include "flizzer_tracker.h" #include "flizzer_tracker_hal.h" -extern bool audio_modes_values[]; -extern char* audio_modes_text[]; - FlizzerTrackerApp* init_tracker( uint32_t sample_rate, uint8_t rate, diff --git a/applications/external/flizzer_tracker/input_event.h b/applications/external/flizzer_tracker/input_event.h index c2b195054..03de663de 100644 --- a/applications/external/flizzer_tracker/input_event.h +++ b/applications/external/flizzer_tracker/input_event.h @@ -18,8 +18,6 @@ extern bool audio_modes_values[]; extern char* audio_modes_text[]; -void return_from_keyboard_callback(void* ctx); - void overwrite_file_widget_yes_input_callback(GuiButtonType result, InputType type, void* ctx); void overwrite_file_widget_no_input_callback(GuiButtonType result, InputType type, void* ctx); diff --git a/applications/external/flizzer_tracker/tracker_engine/do_effects.h b/applications/external/flizzer_tracker/tracker_engine/do_effects.h index 654a61765..450a219ca 100644 --- a/applications/external/flizzer_tracker/tracker_engine/do_effects.h +++ b/applications/external/flizzer_tracker/tracker_engine/do_effects.h @@ -1,3 +1,5 @@ +#pragma once + #include "tracker_engine_defs.h" #include #include diff --git a/applications/external/unitemp/sensors/BME680.h b/applications/external/unitemp/sensors/BME680.h index b126c7c84..dabdaca8e 100644 --- a/applications/external/unitemp/sensors/BME680.h +++ b/applications/external/unitemp/sensors/BME680.h @@ -74,17 +74,16 @@ typedef struct { int32_t t_fine; } BME680_instance; -extern const SensorType BMP280; extern const SensorType BME680; /** - * @brief Выделение памяти и установка начальных значений датчика BMP280 + * @brief Выделение памяти и установка начальных значений датчика BMP680 * @param sensor Указатель на создаваемый датчик * @return Истина при успехе */ bool unitemp_BME680_alloc(Sensor* sensor, char* args); /** - * @brief Инициализации датчика BMP280 + * @brief Инициализации датчика BMP680 * @param sensor Указатель на датчик * @return Истина если инициализация упспешная */ diff --git a/applications/external/unitemp/sensors/BMP180.c b/applications/external/unitemp/sensors/BMP180.c index aa0198289..72cff069e 100644 --- a/applications/external/unitemp/sensors/BMP180.c +++ b/applications/external/unitemp/sensors/BMP180.c @@ -56,8 +56,8 @@ bool unitemp_BMP180_I2C_alloc(Sensor* sensor, char* args) { i2c_sensor->minI2CAdr = 0x77 << 1; i2c_sensor->maxI2CAdr = 0x77 << 1; - BMP180_instance* bmx280_instance = malloc(sizeof(BMP180_instance)); - i2c_sensor->sensorInstance = bmx280_instance; + BMP180_instance* bmx180_instance = malloc(sizeof(BMP180_instance)); + i2c_sensor->sensorInstance = bmx180_instance; return true; } diff --git a/applications/external/unitemp/sensors/SCD30.c b/applications/external/unitemp/sensors/SCD30.c index d7a10149c..d7c358055 100644 --- a/applications/external/unitemp/sensors/SCD30.c +++ b/applications/external/unitemp/sensors/SCD30.c @@ -30,12 +30,6 @@ typedef union { float value; } ByteToFl; -bool unitemp_SCD30_alloc(Sensor* sensor, char* args); -bool unitemp_SCD30_init(Sensor* sensor); -bool unitemp_SCD30_deinit(Sensor* sensor); -UnitempStatus unitemp_SCD30_update(Sensor* sensor); -bool unitemp_SCD30_free(Sensor* sensor); - const SensorType SCD30 = { .typename = "SCD30", .interface = &I2C, diff --git a/applications/external/unitemp/sensors/SCD40.c b/applications/external/unitemp/sensors/SCD40.c index c88943a00..75c5a3f56 100644 --- a/applications/external/unitemp/sensors/SCD40.c +++ b/applications/external/unitemp/sensors/SCD40.c @@ -19,17 +19,11 @@ // Some information may be seen on https://github.com/sparkfun/SparkFun_SCD30_Arduino_Library -#include "SCD30.h" +#include "SCD40.h" #include "../interfaces/I2CSensor.h" #include "../interfaces/endianness.h" //#include <3rdparty/everest/include/everest/kremlin/c_endianness.h> -bool unitemp_SCD40_alloc(Sensor* sensor, char* args); -bool unitemp_SCD40_init(Sensor* sensor); -bool unitemp_SCD40_deinit(Sensor* sensor); -UnitempStatus unitemp_SCD40_update(Sensor* sensor); -bool unitemp_SCD40_free(Sensor* sensor); - const SensorType SCD40 = { .typename = "SCD40", .interface = &I2C, @@ -185,7 +179,7 @@ static bool getSettingValue(Sensor* sensor, uint16_t registerAddress, uint16_t* return loadWord(bytes, val); } -// Get 18 bytes from SCD30 +// Get 18 bytes from SCD40 // Updates global variables with floats // Returns true if success static bool readMeasurement(Sensor* sensor) { diff --git a/applications/external/wifi_deauther/wifi_deauther_uart.c b/applications/external/wifi_deauther/wifi_deauther_uart.c index f7c3ffbf6..8e5f76e14 100644 --- a/applications/external/wifi_deauther/wifi_deauther_uart.c +++ b/applications/external/wifi_deauther/wifi_deauther_uart.c @@ -1,6 +1,7 @@ #include "wifi_deauther_app_i.h" #include "wifi_deauther_uart.h" +#include #include #define BAUDRATE (115200)