Skip to content

Commit ac613a4

Browse files
committed
change base case begin() to init() -- to stop some compiler warnings
1 parent 8dae125 commit ac613a4

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/sfTk/sfDevXM125Core.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "sfDevXM125Core.h"
2020

2121
//--------------------------------------------------------------------------------
22-
sfTkError_t sfDevXM125Core::begin(sfTkII2C *theBus)
22+
sfTkError_t sfDevXM125Core::init(sfTkII2C *theBus)
2323
{
2424
if (theBus == nullptr)
2525
return ksfTkErrBusNotInit;

src/sfTk/sfDevXM125Core.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ class sfDevXM125Core
3030

3131
/// @brief This function begins the examples/communication.
3232
/// @return ksfTkErrOk on success, or error code (value < -1)
33-
virtual sfTkError_t begin(sfTkII2C *theBus = nullptr);
34-
35-
virtual ~sfDevXM125Core() {};
33+
sfTkError_t init(sfTkII2C *theBus = nullptr);
3634

3735
protected:
3836
// our toolkit bus

src/sfTk/sfDevXM125Presence.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
sfTkError_t sfDevXM125Presence::begin(sfTkII2C *theBus)
1616
{
1717
// call super to get the device connection working
18-
sfTkError_t retVal = sfDevXM125Core::begin(theBus);
18+
sfTkError_t retVal = sfDevXM125Core::init(theBus);
1919
if (retVal != ksfTkErrOk)
2020
return retVal;
2121

@@ -316,7 +316,6 @@ sfTkError_t sfDevXM125Presence::setPresenceInterPhaseBoostEnabled(bool en)
316316
//--------------------------------------------------------------------------------
317317
sfTkError_t sfDevXM125Presence::getPresenceIntraDetectionEnabled(bool &en)
318318
{
319-
size_t readBytes = 0;
320319
uint8_t value;
321320
sfTkError_t retVal = _theBus->readRegisterUInt8(SFE_XM125_PRESENCE_INTRA_DETECTION_ENABLED, value);
322321

src/sfTk/sfDevXM125Presence.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ class sfDevXM125Presence : public sfDevXM125Core
243243
* @param theBus Pointer to the I2C bus object. If nullptr, the default bus is used.
244244
* @return ksfTkErrOk on success, or error code (value < -1) on failure.
245245
*/
246-
sfTkError_t begin(sfTkII2C *theBus = nullptr) override;
246+
sfTkError_t begin(sfTkII2C *theBus = nullptr);
247+
247248
/// @brief This function sets all the beginning values for a basic I2C
248249
/// example to be run on the device for presence sensing.
249250
/// @return ksfTkErrOk on success, or error code (value < -1)

0 commit comments

Comments
 (0)