Comments and documentation fixes.

This commit is contained in:
Marco Grella 2015-09-10 14:28:08 +02:00
parent b7459a12c1
commit 87970a88a4
6 changed files with 26 additions and 7 deletions

View file

@ -131,6 +131,11 @@ PROCESS_THREAD(sensor_demo_process, ev, data)
sensor_value = pressure_sensor.value(0);
printf("Pressure:\t%d.%d mbar\n", sensor_value/10, ABS_VALUE(sensor_value)%10);
/* NOTE: this demo uses the mapping of ST Nucleo sensors on Contiki sensor API.
* For a real use case of sensors like acceleration, magneto and gyroscope,
* it is better to directly call the ST lib to get the three value (X/Y/Z)
* at once.
*/
printf("Magneto:\t%d/%d/%d (X/Y/Z) mgauss\n", magneto_sensor.value(X_AXIS),
magneto_sensor.value(Y_AXIS),
magneto_sensor.value(Z_AXIS));