Skip to content

Commit f4dd0ef

Browse files
authored
Merge branch 'main' into casio-weather
2 parents 52fe3a6 + 728da0f commit f4dd0ef

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

.gitattributes

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Set the default behavior, in case people don't have core.autocrlf set.
2-
* text=auto
2+
# Prevent build errors on non lf systems (like Windows), we need files with lf as newlines.
3+
* text=auto eol=lf
34

45
# Explicitly declare text files you want to always be normalized and converted
5-
# to native line endings on checkout.
6+
# to lf line endings on checkout.
67
*.c text
78
*.cpp text
89
*.h text

.github/workflows/main.yml

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
text_size: ${{ steps.output-sizes.outputs.text_size }}
2323
data_size: ${{ steps.output-sizes.outputs.data_size }}
2424
bss_size: ${{ steps.output-sizes.outputs.bss_size }}
25+
firmware_artifact: ${{ steps.upload-firmware.outputs.artifact-id }}
26+
resources_artifact: ${{ steps.upload-resources.outputs.artifact-id }}
2527
env:
2628
# InfiniTime sources are downloaded to the current directory.
2729
# Override SOURCES_DIR in build.sh
@@ -63,11 +65,13 @@ jobs:
6365
path: ./build/output/pinetime-mcuboot-app-image-*.bin
6466
- name: Upload standalone ELF artifacts
6567
uses: actions/upload-artifact@v4
68+
id: upload-firmware
6669
with:
6770
name: InfiniTime image ${{ env.REF_NAME }}
6871
path: ./build/output/src/pinetime-app-*.out
6972
- name: Upload resources artifacts
7073
uses: actions/upload-artifact@v4
74+
id: upload-resources
7175
with:
7276
name: InfiniTime resources ${{ env.REF_NAME }}
7377
path: ./build/output/infinitime-resources-*.zip
@@ -205,6 +209,8 @@ jobs:
205209
| text | ${{ needs.build-firmware.outputs.text_size }}B | ${{ steps.output-sizes-diff.outputs.text_diff }}B |
206210
| data | ${{ needs.build-firmware.outputs.data_size }}B | ${{ steps.output-sizes-diff.outputs.data_diff }}B |
207211
| bss | ${{ needs.build-firmware.outputs.bss_size }}B | ${{ steps.output-sizes-diff.outputs.bss_diff }}B |
212+
213+
[Run in InfiniEmu](https://infiniemu.pipe01.net/?firmware=artifact://${{ github.repository }}/${{ needs.build-firmware.outputs.firmware_artifact }}&resources=artifact://${{ github.repository }}/${{ needs.build-firmware.outputs.resources_artifact }})
208214
EOF
209215
210216
- name: Upload comment

src/displayapp/screens/Notifications.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ namespace {
246246

247247
Notifications::NotificationItem::NotificationItem(Pinetime::Controllers::AlertNotificationService& alertNotificationService,
248248
Pinetime::Controllers::MotorController& motorController)
249-
: NotificationItem("Notification",
250-
"No notification to display",
249+
: NotificationItem("Notifications",
250+
"No notifications to display",
251251
0,
252252
Controllers::NotificationManager::Categories::Unknown,
253253
0,

src/displayapp/screens/WatchFaceInfineat.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,15 @@ void WatchFaceInfineat::Refresh() {
434434

435435
batteryPercentRemaining = batteryController.PercentRemaining();
436436
isCharging = batteryController.IsCharging();
437-
if (batteryController.IsCharging()) { // Charging battery animation
438-
chargingBatteryPercent += 1;
437+
// Charging battery animation
438+
if (batteryController.IsCharging() && (xTaskGetTickCount() - chargingAnimationTick > pdMS_TO_TICKS(150))) {
439+
// Dividing 100 by the height gives the battery percentage required to shift the animation by 1 pixel
440+
chargingBatteryPercent += 100 / lv_obj_get_height(logoPine);
439441
if (chargingBatteryPercent > 100) {
440442
chargingBatteryPercent = batteryPercentRemaining.Get();
441443
}
442444
SetBatteryLevel(chargingBatteryPercent);
445+
chargingAnimationTick = xTaskGetTickCount();
443446
} else if (isCharging.IsUpdated() || batteryPercentRemaining.IsUpdated()) {
444447
chargingBatteryPercent = batteryPercentRemaining.Get();
445448
SetBatteryLevel(chargingBatteryPercent);

src/displayapp/screens/WatchFaceInfineat.h

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ namespace Pinetime {
4747
private:
4848
uint32_t savedTick = 0;
4949
uint8_t chargingBatteryPercent = 101; // not a mistake ;)
50+
TickType_t chargingAnimationTick = 0;
5051

5152
Utility::DirtyValue<uint8_t> batteryPercentRemaining {};
5253
Utility::DirtyValue<bool> isCharging {};

0 commit comments

Comments
 (0)