[PR #337] [MERGED] Bugfix: Update variable minutesUntilNextUpdate to 32-bit integer because of integer overflow #1605

Closed
opened 2026-03-20 19:09:17 +01:00 by sascha_hemi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/OpenEPaperLink/OpenEPaperLink/pull/337
Author: @mnyhlen
Created: 6/12/2024
Status: Merged
Merged: 6/15/2024
Merged by: @skiphansen

Base: masterHead: bugfix_calculating_nextcheckin


📝 Commits (1)

  • 6981171 Bugfix: Update variable minutesUntilNextUpdate to 32-bit integer because of integer overflow

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 ESP32_AP-Flasher/src/contentmanager.cpp (+1 -1)

📄 Description

At time of writing this, when a tag is idle, it will check in once every minute regardless of what you have set your "Maximum sleep" to. This happens because the result of calculating minutesUntilNextUpdate will be a negative number and prepareIdleReq will never be executed. On (Wed Jul 03 2024 00:33:00 GMT+0000) tags will idle as it should again when the calculated value will be a positive number and will work as it is supposed to for approximately ~22,75 days when it will become a negative number again.

Changing the variable to 32-bit instead of 16-bit will resolve this "interval bug".


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/OpenEPaperLink/OpenEPaperLink/pull/337 **Author:** [@mnyhlen](https://github.com/mnyhlen) **Created:** 6/12/2024 **Status:** ✅ Merged **Merged:** 6/15/2024 **Merged by:** [@skiphansen](https://github.com/skiphansen) **Base:** `master` ← **Head:** `bugfix_calculating_nextcheckin` --- ### 📝 Commits (1) - [`6981171`](https://github.com/OpenEPaperLink/OpenEPaperLink/commit/6981171a6e4e9cf24ec322b647406710448fcc7a) Bugfix: Update variable minutesUntilNextUpdate to 32-bit integer because of integer overflow ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `ESP32_AP-Flasher/src/contentmanager.cpp` (+1 -1) </details> ### 📄 Description At time of writing this, when a tag is idle, it will check in once every minute regardless of what you have set your "Maximum sleep" to. This happens because the result of calculating minutesUntilNextUpdate will be a negative number and prepareIdleReq will never be executed. On (Wed Jul 03 2024 00:33:00 GMT+0000) tags will idle as it should again when the calculated value will be a positive number and will work as it is supposed to for approximately ~22,75 days when it will become a negative number again. Changing the variable to 32-bit instead of 16-bit will resolve this "interval bug". --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
sascha_hemi added the pull-request label 2026-03-20 19:09:17 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/OpenEPaperLink#1605