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

Battery measurement works only on first sample(s) #86

Closed
ojousima opened this issue Jul 9, 2020 · 4 comments
Closed

Battery measurement works only on first sample(s) #86

ojousima opened this issue Jul 9, 2020 · 4 comments
Assignees
Labels
Pending Work is complete, waits for merge to master
Milestone

Comments

@ojousima
Copy link
Member

ojousima commented Jul 9, 2020

Battery measurement is synchronized to radio, ADC is configured for sampling on before_radio_activity event and actual sample is taken on after_radio_activity event. The sampled data is stored in rt_adc and read later in app_heartbeat when sending data as BLE advertisement.

The ADC was uninitialized in 3.28 firmwares after sample to reduce power consumption. Now either uninitialization or reinitialization errors and the data won't be updated.

app_sensor.c:236 WARNING: INVALID_STATE
app_sensor.c:231 WARNING: BUSY
app_sensor.c:236 WARNING: INVALID_STATE
app_sensor.c:231 WARNING: BUSY

Relevant functions are in app_sensor, app_heartbeat and ruuvi_task_adc.

The sampling after radio transmission should be fixed. Ruuvi Station app can be used to check that ADC data is getting updated.

@DG12
Copy link
Contributor

DG12 commented Jul 9, 2020

Can you please revisit "... initialize variables to compile time values from default VALUES and permit subsequent configuration (without compile) "

as per ruuvi/ruuvitag_fw#145 and perhaps ruuvi/ruuvitag_fw#137
Thank you

@ojousima
Copy link
Member Author

ojousima commented Jul 10, 2020

e.g. sensor configuration is already stored on flash, and things such as data format and radio power / interval are on roadmap.
Added issue #89

@opsationby
Copy link
Contributor

@ojousima I think ruuvi/ruuvi.drivers.c#105 may fix this problem

@ojousima
Copy link
Member Author

@opsationby Yes, this issue is fixed. I'll leave this issue open until update-modules is merged to master, thanks.

@ojousima ojousima added the Pending Work is complete, waits for merge to master label Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending Work is complete, waits for merge to master
Projects
None yet
Development

No branches or pull requests

3 participants