Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memo: "Delete all records" does not delete ALL records #240

Closed
bentolor opened this issue Aug 14, 2022 · 5 comments
Closed

Memo: "Delete all records" does not delete ALL records #240

bentolor opened this issue Aug 14, 2022 · 5 comments

Comments

@bentolor
Copy link

Hi @pvvx Victor,

I'm using the Graph Memo functionality quite regularily. Unfortunately the delete all record function does not delete all records.

See below after a fresh "delete all records". It only seems to delete all recent records.

Example 1: After "delete all records"

grafik

Example 2: Before "delete all records"

grafik

Example 2: After "delete all records"

grafik

@pvvx
Copy link
Owner

pvvx commented Aug 17, 2022

It is possible that the battery is low.
There was not enough energy for the entire memory erasing cycle and the device rebooted?

@bentolor
Copy link
Author

bentolor commented Aug 18, 2022

@pvvx I don't think so as I'm able to reproduce this behaviour on multiple devices and I'm not loosing bluetooth connection. I can directly issue a "get time" command right after it.

Just did it on a 3rd device: It always seems to be based on very old data. What remains are the values from 30 March to 22 April. Deleted are all newer than April 22 18:00.

Also: Repeated deletion does not change the data which is not deleted: It stays the same date range: 30 March to 22 April.

I'd see some display flickering or loss of bluetooth connection in case of a reboot, right?

@pvvx
Copy link
Owner

pvvx commented Aug 19, 2022

I'd see some display flickering or loss of bluetooth connection in case of a reboot, right?

Yes.
The procedure code in the loop erases the sectors.
It cannot abort until it has erased all Flash sectors associated with "Memo".

@bentolor
Copy link
Author

bentolor commented Aug 25, 2022

@pvvx Just tried this again on another device and now I feel pretty confident that its not the battery. Here is why:

  • Downloading the full data takes much, much, much longer and I can even see the display become lighter during the transmission while
  • deletion happens in a glimpse: Display is stable; no flicker; bluetooth stays connected. Nothing at all.

Please check the attachments: First on before deletion, second after deletion. Maybe they can give a hint?
lounge-measurements.csv
lounge-measurements-truncated.csv

Looking at the referred code and asking a few dumb questions:

while (faddr < FLASH_ADDR_END_MEMO) {
               …
		if (tmp != MEMO_SEC_ID)
			_flash_erase_sector(faddr);
               …

pvvx added a commit that referenced this issue Aug 29, 2022
@pvvx pvvx closed this as completed Sep 12, 2022
@bentolor
Copy link
Author

Thank you, @pvvx! I just tested the new 3.8 on one device and can confirm that deleting now works as expected! Awesome!

FaBjE pushed a commit to FaBjE/ATC_MiThermometer that referenced this issue May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants