Comments (7)
with 36 multiplier you're running into integer overflow.
if((clock_time()-last_adv_delay) > advertising_interval*(advertising_type?5000:10000)*CLOCK_SYS_CLOCK_1MS)
so it's: 36*10000*24000 = 8640000000
, twice as much as uint32 can take;)
I think that highest you can go is 17.
from atc_mithermometer.
Correct.
This is a future fix. Need to get myself into it :)
from atc_mithermometer.
with 36 multiplier you're running into integer overflow.
ok, that's why the 5 and 10 minutes from web flasher cannot work too, right?
For understanding - what time interval is it?
I still see advertising data every minute, or I'm wrong? Is it the interval for sending an actual value in advertising packet?
Thanks for help!
Michael
from atc_mithermometer.
@atc1441 skimming through docs i've found clock_time_exceed( unsigned int ref, unsigned int us )
that handles the whole clock frequency part, taking interval in microseconds as uint. that would give max interval of 4294 seconds without introducing second variable to count interval ticks
from atc_mithermometer.
Thank you for that.
I did used that method at the beginning but had the same problems with the overflow. Will look into it again
from atc_mithermometer.
On the second thought, there will be still problem of internal clock overlaping somewhere between 100-200seconds, depending of clock frequency, no matter which function is used to measure time.
from atc_mithermometer.
Thats what i was also seeing when using it.
A plan is to have an extra Arduino like millis timer to have independent precise timing available.
So ((overflow counter)*X) + (current counter value) = millis
from atc_mithermometer.
Related Issues (20)
- Compatibility with TH05? HOT 2
- CGG1-M 2022 shows 0,0°C temperature and 0% humidity
- LCD Refresh interval longer than 12.x seconds
- Qingping CGDK2 zigbee fw shows wrong temp HOT 1
- New device from Xiaomi: XMWSDJ04MMC HOT 1
- Problem activating LYWSD03MMC v2.1.1_0159 HOT 2
- Lost Advertising Type after Battery change HOT 1
- ad interval setting seems to not work HOT 2
- lywsd03mmc not flashing with new firmware HOT 1
- Random bind key
- Force into pairing mode. HOT 2
- Custom battery levels
- Calibrate LYWSD03MMC in Zigbee mode (ZHA)
- Venus operating System HOT 1
- Way to read Data from ATC-flashed devices via Android Gadgetbridge-App
- Device bricked after successful flash and battery removal HOT 2
- Does the sensor have a spare GPIO I can use?
- Remote display solutions experiences HOT 1
- More Options HOT 1
- Flashing not working. HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atc_mithermometer.