I have strange problem with dictionaries that I can’t figure out…
I have two dictionaries. One is used as a kind of temporary data collector where GPS, ACC and BT store data. Here is accelerometer example:
simmilar for a GPS. When I receive data ove BT I get a time stamp (elmTS), do some calculations (calPIDs), and some analitics/visualisation, then I store same Values_to_store to a new dictionary RAM where key is timestamp (elmTS):
visualisation blok looks like that:
when it is time to send data to web API that code happens:
I pick up the oldest time stamp key and pass it to API.
When it is processed API returns code 200 and the elmTS time stamp. Thats a block:
As can be seen I remove succesful sent data from the dictionar.
All works as expected as long as network is present but as soon as it is not it stops working correctly.
It stil collects data as expected, I can see them in via analitics but somehow it keeps storing same value of Values_to_store regardles the fact that visualisation shows correct values…
After restoring network it stores correct values again…
Any suggestion would be appriciated.