summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/ble/BatteryInformationService.cpp1
-rw-r--r--src/components/ble/MotionService.cpp1
-rw-r--r--src/components/datetime/DateTimeController.cpp1
-rw-r--r--src/components/fs/FS.cpp5
-rw-r--r--src/components/motion/MotionController.cpp3
5 files changed, 11 insertions, 0 deletions
diff --git a/src/components/ble/BatteryInformationService.cpp b/src/components/ble/BatteryInformationService.cpp
index 9a3f86f5..14589cb9 100644
--- a/src/components/ble/BatteryInformationService.cpp
+++ b/src/components/ble/BatteryInformationService.cpp
@@ -49,6 +49,7 @@ int BatteryInformationService::OnBatteryServiceRequested(uint16_t connectionHand
}
return 0;
}
+
void BatteryInformationService::NotifyBatteryLevel(uint16_t connectionHandle, uint8_t level) {
auto* om = ble_hs_mbuf_from_flat(&level, 1);
ble_gattc_notify_custom(connectionHandle, batteryLevelHandle, om);
diff --git a/src/components/ble/MotionService.cpp b/src/components/ble/MotionService.cpp
index 121ad3b0..a7e95923 100644
--- a/src/components/ble/MotionService.cpp
+++ b/src/components/ble/MotionService.cpp
@@ -90,6 +90,7 @@ void MotionService::OnNewStepCountValue(uint32_t stepCount) {
ble_gattc_notify_custom(connectionHandle, stepCountHandle, om);
}
+
void MotionService::OnNewMotionValues(int16_t x, int16_t y, int16_t z) {
if (!motionValuesNoficationEnabled)
return;
diff --git a/src/components/datetime/DateTimeController.cpp b/src/components/datetime/DateTimeController.cpp
index e8c7cd5b..73364b2f 100644
--- a/src/components/datetime/DateTimeController.cpp
+++ b/src/components/datetime/DateTimeController.cpp
@@ -142,6 +142,7 @@ void DateTime::Register(Pinetime::System::SystemTask* systemTask) {
}
using ClockType = Pinetime::Controllers::Settings::ClockType;
+
std::string DateTime::FormattedTime() {
// Return time as a string in 12- or 24-hour format
char buff[9];
diff --git a/src/components/fs/FS.cpp b/src/components/fs/FS.cpp
index 14b05525..a67b6b3d 100644
--- a/src/components/fs/FS.cpp
+++ b/src/components/fs/FS.cpp
@@ -89,18 +89,23 @@ int FS::DirClose(lfs_dir_t* lfs_dir) {
int FS::DirRead(lfs_dir_t* dir, lfs_info* info) {
return lfs_dir_read(&lfs, dir, info);
}
+
int FS::DirRewind(lfs_dir_t* dir) {
return lfs_dir_rewind(&lfs, dir);
}
+
int FS::DirCreate(const char* path) {
return lfs_mkdir(&lfs, path);
}
+
int FS::Rename(const char* oldPath, const char* newPath) {
return lfs_rename(&lfs, oldPath, newPath);
}
+
int FS::Stat(const char* path, lfs_info* info) {
return lfs_stat(&lfs, path, info);
}
+
lfs_ssize_t FS::GetFSSize() {
return lfs_fs_size(&lfs);
}
diff --git a/src/components/motion/MotionController.cpp b/src/components/motion/MotionController.cpp
index d93d769b..8ba46814 100644
--- a/src/components/motion/MotionController.cpp
+++ b/src/components/motion/MotionController.cpp
@@ -61,6 +61,7 @@ bool MotionController::Should_ShakeWake(uint16_t thresh) {
lastZForShake = z;
return wake;
}
+
int32_t MotionController::currentShakeSpeed() {
return accumulatedspeed;
}
@@ -68,6 +69,7 @@ int32_t MotionController::currentShakeSpeed() {
void MotionController::IsSensorOk(bool isOk) {
isSensorOk = isOk;
}
+
void MotionController::Init(Pinetime::Drivers::Bma421::DeviceTypes types) {
switch (types) {
case Drivers::Bma421::DeviceTypes::BMA421:
@@ -81,6 +83,7 @@ void MotionController::Init(Pinetime::Drivers::Bma421::DeviceTypes types) {
break;
}
}
+
void MotionController::SetService(Pinetime::Controllers::MotionService* service) {
this->service = service;
}