From 270806e5faf1cb7f8283ad49a33f8b0b3b808843 Mon Sep 17 00:00:00 2001 From: Marcus Date: Mon, 18 Nov 2024 23:11:04 +0100 Subject: [PATCH] cannot use array , because of pointer https://www.reddit.com/r/C_Programming/comments/q1it3p/help_why_cant_you_assign_an_array_to_another_array/ --- Arduino/CanGrow/include/CanGrow_Sensor.h | 40 ++++++------------- .../CanGrow/include/Sensor/01_ADC_builtin.h | 1 - Arduino/CanGrow/include/Sensor/02_BME280.h | 5 --- 3 files changed, 13 insertions(+), 33 deletions(-) diff --git a/Arduino/CanGrow/include/CanGrow_Sensor.h b/Arduino/CanGrow/include/CanGrow_Sensor.h index 958ce3c..b6da85b 100644 --- a/Arduino/CanGrow/include/CanGrow_Sensor.h +++ b/Arduino/CanGrow/include/CanGrow_Sensor.h @@ -62,33 +62,19 @@ Sensor_Index SensorIndex[] { {}, }}, - // 1 - internal ADC - { SENSOR_01_NAME, { - SENSOR_READING_RAW, - }}, +// 1 - internal ADC + { SENSOR_01_NAME, + { + SENSOR_READING_TEMP + }, + }, // 2 - BME280 - { "BME280", { - SENSOR_READING_TEMP, - SENSOR_READING_HUMIDITY, - SENSOR_READING_PRESSURE, - }}, - - // 3 - { "Chirp", { - SENSOR_READING_MOISTURE, - SENSOR_READING_TEMP, - SENSOR_READING_RAW, - }}, - - // 4 - { "ADS1115", { - SENSOR_READING_RAW, - SENSOR_READING_RAW, - SENSOR_READING_RAW, - SENSOR_READING_RAW - }}, - - // 5 - + { SENSOR_02_NAME, + { + SENSOR_READING_TEMP, + SENSOR_READING_HUMIDITY, + SENSOR_READING_PRESSURE + }, + } }; diff --git a/Arduino/CanGrow/include/Sensor/01_ADC_builtin.h b/Arduino/CanGrow/include/Sensor/01_ADC_builtin.h index 718e485..a400d0c 100644 --- a/Arduino/CanGrow/include/Sensor/01_ADC_builtin.h +++ b/Arduino/CanGrow/include/Sensor/01_ADC_builtin.h @@ -30,4 +30,3 @@ #define SENSOR_01_NAME "ADC builtin" #define ADC_BUILTIN_MAX 0 -const byte SENSOR_01_READINGS[] = { SENSOR_READING_RAW }; diff --git a/Arduino/CanGrow/include/Sensor/02_BME280.h b/Arduino/CanGrow/include/Sensor/02_BME280.h index 915eab0..d887a06 100644 --- a/Arduino/CanGrow/include/Sensor/02_BME280.h +++ b/Arduino/CanGrow/include/Sensor/02_BME280.h @@ -33,11 +33,6 @@ #define SENSOR_02_NAME "BME280" #define BME280_MAX 2 - -const byte SENSOR_02_READINGS[] = { - SENSOR_READING_TEMP, - SENSOR_READING_HUMIDITY, - SENSOR_READING_PRESSURE }; Adafruit_BME280 BME280[BME280_MAX];