Skip to content
Snippets Groups Projects
Verified Commit 4ed95885 authored by genofire's avatar genofire
Browse files

light sensor: run on startup of card10

parent 3019031a
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,8 @@ be fairly stable.
.. py:function:: light_sensor.start()
Turn on the ADC and start reading brightness values. This function must be
called before any measurements can be taken.
Turn on the ADC and start reading brightness values. (In past this function must be
called before any measurements can be taken.)
.. py:function:: light_sensor.get_reading()
......
......@@ -233,9 +233,7 @@ static uint8_t readCard10CB(
switch (handle) {
case CARD10_LIGHT_SENSOR_VAL_HDL:
epic_light_sensor_run();
epic_light_sensor_get(&ui16);
// epic_light_sensor_stop(); stop it everywhere, also in py
*pAttr->pValue = ui16;
APP_TRACE_INFO1("ble-card10: read lightsensor: %d\n", ui16);
return ATT_SUCCESS;
......
......@@ -126,6 +126,10 @@ int main(void)
LOG_INFO("startup", "Initializing dispatcher ...");
api_dispatcher_init();
/* light sensor */
LOG_INFO("startup", "starting light sensor ...");
epic_light_sensor_run();
/*
* See if there's a l0dable.elf to run. If not, run pycardium.
* This is temporary until epicardium gets a l0dable API from pycardium.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment