mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-09-11 09:04:53 +00:00
[VL53L1X] Move includes to .cpp for linker to leave out unused code
This commit is contained in:
@@ -33,6 +33,12 @@
|
||||
#include <stdlib.h>
|
||||
#include "SparkFun_VL53L1X.h"
|
||||
|
||||
#include "st_src/RangeSensor.h"
|
||||
#include "st_src/vl53l1_error_codes.h"
|
||||
#include "st_src/ComponentObject.h"
|
||||
#include "st_src/RangeSensor.h"
|
||||
|
||||
|
||||
SFEVL53L1X::SFEVL53L1X()
|
||||
{
|
||||
_i2cPort = &Wire;
|
||||
|
||||
@@ -33,12 +33,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "Wire.h"
|
||||
#include "st_src/RangeSensor.h"
|
||||
#include "st_src/vl53l1_error_codes.h"
|
||||
|
||||
#include "st_src/vl53l1x_class.h"
|
||||
#include "st_src/ComponentObject.h"
|
||||
#include "st_src/RangeSensor.h"
|
||||
|
||||
#define DISTANCE_SHORT 1
|
||||
#define DISTANCE_LONG 2
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
#ifdef USES_P113
|
||||
|
||||
# if P113_USE_ROI
|
||||
# include "../Static/WebStaticData.h" // Javascript and support functions
|
||||
# endif // if P113_USE_ROI
|
||||
|
||||
# include <SparkFun_VL53L1X.h>
|
||||
|
||||
|
||||
P113_data_struct::P113_data_struct(uint8_t i2c_addr, int timing, bool range) : i2cAddress(i2c_addr), timing(timing), range(range) {
|
||||
sensor = new (std::nothrow) SFEVL53L1X();
|
||||
}
|
||||
|
||||
@@ -23,11 +23,8 @@
|
||||
# endif // if defined(LIMIT_BUILD_SIZE) && defined(ESP8266)
|
||||
# endif // ifndef P113_USE_ROI
|
||||
|
||||
# include <SparkFun_VL53L1X.h>
|
||||
class SFEVL53L1X; // Forward declaration
|
||||
|
||||
# if P113_USE_ROI
|
||||
# include "../Static/WebStaticData.h" // Javascript and support functions
|
||||
# endif // if P113_USE_ROI
|
||||
|
||||
# define P113_I2C_ADDRESS PCONFIG(0)
|
||||
# define P113_TIMING PCONFIG(1)
|
||||
|
||||
Reference in New Issue
Block a user