Skip to content

Commit dff1747

Browse files
committed
adding "const" modifier added. version number update
1 parent 768fcb6 commit dff1747

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ PROJECT_NAME = "I2C_device_Arduino"
4848
# could be handy for archiving the generated documentation or if some version
4949
# control system is used.
5050

51-
PROJECT_NUMBER = 1.0.1
51+
PROJECT_NUMBER = 1.0.2
5252

5353
# Using the PROJECT_BRIEF tag one can provide an optional one line description
5454
# for a project that appears at the top of each page and should give viewer a

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=I2C_device_Arduino
2-
version=1.0.1
2+
version=1.0.2
33
author=Tedd OKANO
44
maintainer=Tedd OKANO
55
sentence=I2C_device class library

src/test_LM75B.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
/* LM75B class ******************************************/
44

5-
test_LM75B::test_LM75B( uint8_t i2c_address ) : I2C_device( i2c_address )
5+
test_LM75B::test_LM75B( const uint8_t i2c_address ) : I2C_device( i2c_address )
66
{
77
}
88

9-
test_LM75B::test_LM75B( TwoWire& wire, uint8_t i2c_address ) : I2C_device( wire, i2c_address )
9+
test_LM75B::test_LM75B( TwoWire& wire, const uint8_t i2c_address ) : I2C_device( wire, i2c_address )
1010
{
1111
}
1212

@@ -19,7 +19,7 @@ float test_LM75B::read()
1919
return read_r16( Temp ) / 256.0;
2020
}
2121

22-
void test_LM75B::thresholds( float v0, float v1 )
22+
void test_LM75B::thresholds( const float v0, const float v1 )
2323
{
2424
float higher = (v0 < v1) ? v1 : v0;
2525
float lower = (v0 < v1) ? v0 : v1;
@@ -28,7 +28,7 @@ void test_LM75B::thresholds( float v0, float v1 )
2828
write_r16( Thyst, ((uint16_t)(lower * 256.0)) & 0xFF80 );
2929
}
3030

31-
void test_LM75B::os_mode( mode flag )
31+
void test_LM75B::os_mode( const mode flag )
3232
{
3333
uint8_t v;
3434

src/test_LM75B.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ class test_LM75B : public I2C_device
4444
*
4545
* @param i2c_address I2C-bus address (default: (0x90>>1))
4646
*/
47-
test_LM75B( uint8_t i2c_address = (0x90 >> 1) );
47+
test_LM75B( const uint8_t i2c_address = (0x90 >> 1) );
4848

4949
/** Create a PCT2075 instance connected to specified I2C pins with specified address
5050
*
5151
* @param wire TwoWire instance
5252
* @param i2c_address I2C-bus address (default: (0x90>>1))
5353
*/
54-
test_LM75B( TwoWire& wire, uint8_t i2c_address = (0x90 >> 1) );
54+
test_LM75B( TwoWire& wire, const uint8_t i2c_address = (0x90 >> 1) );
5555

5656
/** Destructor of PCT2075
5757
*/
@@ -71,13 +71,13 @@ class test_LM75B : public I2C_device
7171
* @param v0 a value in degree Celsius
7272
* @param v1 a value in degree Celsius
7373
*/
74-
void thresholds( float v0, float v1 );
74+
void thresholds( const float v0, const float v1 );
7575

7676
/** Set OS operation mode
7777
*
7878
* @param flag use PCT2075::COMPARATOR or PCT2075::INTERRUPT values
7979
*/
80-
void os_mode( mode flag );
80+
void os_mode( const mode flag );
8181
};
8282

8383
#endif // ARDUINO_TEMP_SENSOR_H

0 commit comments

Comments
 (0)