Skip to content

Commit 1f33b8a

Browse files
Eric Bersetheberseth
Eric Berseth
authored andcommitted
Remove Sensirion library
1 parent 1b41bcc commit 1f33b8a

File tree

5 files changed

+2
-42
lines changed

5 files changed

+2
-42
lines changed

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,3 @@
2525
[submodule "lib/model_gauge"]
2626
path = lib/model_gauge
2727
url = https://github.com/particle-iot/model_gauge.git
28-
[submodule "lib/sensirion"]
29-
path = lib/sensirion
30-
url = https://github.com/particle-iot/sensirion.git

lib/sensirion

-1
This file was deleted.

src/EdgePlatform.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ void EdgePlatform::init()
153153
currentLimit_ = Ilim::eILIM_3;
154154
}
155155

156-
// Sensirion sensor type is currently not a field in OTP. However, there may be a field in the future.
157-
sensirion_ = EdgePlatform::SensirionType::eSENSE_INVALID;
158156
#endif
159157

160158
// Flag the initialization as complete
@@ -223,10 +221,3 @@ EdgePlatform::FuelGaugeType EdgePlatform::getFuelGaugeType() const
223221

224222
return fg_;
225223
}
226-
227-
EdgePlatform::SensirionType EdgePlatform::getSensirionType() const
228-
{
229-
CHECK_TRUE(isInitialized_, SensirionType::eSENSE_INVALID);
230-
231-
return sensirion_;
232-
}

src/EdgePlatform.h

-15
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ class EdgePlatform
8585
eFG_INVALID
8686
};
8787

88-
enum class SensirionType
89-
{
90-
eSHT,
91-
eSTS31,
92-
eSENSE_INVALID
93-
};
94-
9588
/**
9689
* @brief Return instance of the LocationService
9790
*
@@ -175,13 +168,6 @@ class EdgePlatform
175168
*/
176169
FuelGaugeType getFuelGaugeType() const;
177170

178-
/**
179-
* @brief Return Sensirion sensory type
180-
*
181-
* @return SensirionType
182-
*/
183-
SensirionType getSensirionType() const;
184-
185171
private:
186172
/**
187173
* Create a new Tracker Platform object
@@ -200,5 +186,4 @@ class EdgePlatform
200186
ThermistorType tr_ {ThermistorType::eTR_INVALID};
201187
WiFiVariant wifi_ {WiFiVariant::eWIFI_INVALID};
202188
FuelGaugeType fg_ {FuelGaugeType::eFG_INVALID};
203-
SensirionType sensirion_ {SensirionType::eSENSE_INVALID};
204189
};

src/temperature.cpp

+2-14
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include <atomic>
1818
#include "EdgePlatform.h"
19-
#include "Sts3x.h"
2019
#include "thermistor.h"
2120
#include "temperature.h"
2221
#include "tracker_sleep.h"
@@ -87,7 +86,6 @@ enum class TempChargeState {
8786

8887

8988
static Thermistor _thermistor;
90-
static Sts3x _sts(Wire, Sts3x::AddrA, PIN_INVALID);
9189
static TemperatureCallback _eventCallback = nullptr;
9290
static unsigned int chargeEvalTick = 0;
9391

@@ -97,21 +95,11 @@ void onWake(TrackerSleepContext context) {
9795
}
9896

9997
float get_temperature() {
100-
if (EdgePlatform::instance().getSensirionType() != EdgePlatform::SensirionType::eSENSE_INVALID) {
101-
float temp {};
102-
_sts.singleMeasurement(temp);
103-
return temp;
104-
} else {
105-
return _thermistor.getTemperature();
106-
}
98+
return _thermistor.getTemperature();
10799
}
108100

109101
int temperature_init(pin_t analogPin, TemperatureCallback eventCallback) {
110-
if (EdgePlatform::instance().getSensirionType() != EdgePlatform::SensirionType::eSENSE_INVALID) {
111-
CHECK_TRUE(_sts.init(), SYSTEM_ERROR_INTERNAL);
112-
} else {
113-
CHECK(_thermistor.begin(analogPin, _thermistorConfig));
114-
}
102+
CHECK(_thermistor.begin(analogPin, _thermistorConfig));
115103

116104
static ConfigObject _serviceObject
117105
(

0 commit comments

Comments
 (0)