summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvamander <avamander@gmail.com>2021-06-24 21:40:55 (GMT)
committerJF002 <JF002@users.noreply.github.com>2021-07-02 14:27:41 (GMT)
commitbdb5965f1a3432a4f24b5fc566973bf4ab811b08 (patch)
tree77de1bc6411726c47ec9ec3636b8a85f4902b6b1
parent2f479e5fc7688ae47e99c0f4aead87c9cdc29123 (diff)
static_cast cleanup
-rw-r--r--src/components/battery/BatteryController.cpp2
-rw-r--r--src/displayapp/screens/SystemInfo.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/components/battery/BatteryController.cpp b/src/components/battery/BatteryController.cpp
index bc14645..b153b98 100644
--- a/src/components/battery/BatteryController.cpp
+++ b/src/components/battery/BatteryController.cpp
@@ -14,7 +14,7 @@ Battery::Battery() {
}
void Battery::Init() {
- nrf_gpio_cfg_input(chargingPin, (nrf_gpio_pin_pull_t) GPIO_PIN_CNF_PULL_Pullup);
+ nrf_gpio_cfg_input(chargingPin, static_cast<nrf_gpio_pin_pull_t> GPIO_PIN_CNF_PULL_Pullup);
}
void Battery::Update() {
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp
index f70b67f..1e90bf4 100644
--- a/src/displayapp/screens/SystemInfo.cpp
+++ b/src/displayapp/screens/SystemInfo.cpp
@@ -203,11 +203,11 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen3() {
bleAddr[2],
bleAddr[1],
bleAddr[0],
- (int) mon.total_size - mon.free_size,
+ static_cast<int>(mon.total_size - mon.free_size),
mon.used_pct,
mon.max_used,
mon.frag_pct,
- (int) mon.free_biggest_size,
+ static_cast<int>(mon.free_biggest_size),
0);
lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0);
return std::make_unique<Screens::Label>(2, 5, app, label);