Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akkoyun committed Feb 21, 2024
1 parent dd0c85c commit e9b5836
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 39 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Environment",
"version": "5.9.2",
"version": "5.9.3",
"keywords": "Sensor, Environment, SHT21, HDC2010, TSL2561, MPL3115, Temperature, Humidity, Pressure, Light",
"description": "Function measures the value of given sensors. Library is used data mining for stable sensor data. Also cleared for lite use.",
"authors": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Environment
version=5.9.2
version=5.9.3
author=Gunce Akkoyun <akkoyun@me.com>
maintainer=Gunce Akkoyun <akkoyun@me.com>
sentence=Read environment sensors
Expand Down
55 changes: 18 additions & 37 deletions src/Environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -530,24 +530,6 @@

}

// Enable / Disable Heater Function
// void Heater(bool _State = false) {

// Control for State
// if (_State) {

// Set Bit
// I2C_Functions::Set_Register_Bit(0x0E, 3, true);

// } else {

// Clear Bit
// I2C_Functions::Clear_Register_Bit(0x0E, 3, true);

// }

// }

// Public Context
public:

Expand Down Expand Up @@ -828,6 +810,24 @@

}

// Enable / Disable Heater Function
void Heater(bool _State = false) {

// Control for State
if (_State) {

// Set Bit
I2C_Functions::Set_Register_Bit(0x0E, 3, true);

} else {

// Clear Bit
I2C_Functions::Clear_Register_Bit(0x0E, 3, true);

}

}

// Read Temperature Function
float Temperature(const uint8_t _Measurement_Count = 1) {

Expand Down Expand Up @@ -1131,21 +1131,6 @@
*/
struct TSL2561_Struct {

/**
* @brief MPL3115A2 Sensor Address Variable.
*/
uint8_t TWI_Address = 0x39;

/**
* @brief Sensor Mux Variable (if after a I2C multiplexer).
*/
bool Mux_Enable = false;

/**
* @brief Sensor Mux Channel (if after a I2C multiplexer).
*/
uint8_t Mux_Channel = 0;

/**
* @brief Measurement Read Count Variable (if not defined 1 measurement make).
*/
Expand Down Expand Up @@ -1397,10 +1382,6 @@
// Enable Calibration
this->Sensor.Calibration = _Calibration_Enable;

// Set Multiplexer Variables
this->Sensor.Mux_Enable = _Multiplexer_Enable;
this->Sensor.Mux_Channel = _Multiplexer_Channel;

}

/**
Expand Down

0 comments on commit e9b5836

Please sign in to comment.