Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
environmentalController Class Reference
Generic implementation for environment controller. More...
#include <environmentControl.h>
Public Member Functions | |
environmentalController () | |
Constructor to initialize variables to 0. | |
void | setTargetDistance (uint16_t targetDistanceInMM) |
Sets target distance. | |
void | setChamberTemperature (int8_t chamberTemperatureInC) |
Sets chamber temperature. | |
void | setAmbientLight (uint32_t ambientLightInLux) |
Sets ambient light condition. | |
void | setTargetToInfinity_OR_coverPhotodiode () |
Sets target such that the amplitude of system is very low This is a crucial step to determine OPT3101::crosstalkC values for the OPT3101 system. The environmentController is expected to target in such a way that the amplitude of the system reads a low enough value that this can be ignored as crosstalk value. Either setting target to far enough position (or low enough reflectivity) or covering the photo diode would help achieve this. | |
void | manuallySetReferenceDistances () |
A method used to determine the reference distances to be used for phase offset calibration. | |
Data Fields | |
uint16_t | refDistancesInMM [3][2] |
Reference distance list to be used for phase offset calibration. |
Detailed Description
Generic implementation for environment controller.
As part of OPT3101SDK there are several environment specific functions that need to be performed. Examples of such functions are setting up targets at particular distance, setting up chamber temperature. These are essential functions to perform the calibration of OPT3101 based system. The setting up of these environment conditions have to be done at specific steps during calibration. The template class environmentalController makes this process simple and scalable. Appropriate methods of this class are called at relevant steps in calibration. Users using this SDK are expected to implement these functions based on the environment setup.
The names of the methods reflect the conditions for the environment. For eg: environmentalController::setTargetToInfinity_OR_coverPhotodiode method as the name suggest is a condition where the OPT3101 system needs to be pointed to infinity (far away from detectable range of system) or the photo diode needs to be covered so no light leaks directly between the transmitter(s) and photo diode. These implementations are very specific to the host on which the SDK is ported and run.
This abstract class provides a template with self explanatory method names which the users can override and implement their own functions.
Definition at line 45 of file environmentControl.h.
Constructor & Destructor Documentation
Constructor to initialize variables to 0.
- Returns:
- Nothing
Algorithm of the method is as follows This is empty method to be overwritten by user
Definition at line 37 of file environmentControl.cpp.
Member Function Documentation
void manuallySetReferenceDistances | ( | ) |
A method used to determine the reference distances to be used for phase offset calibration.
- Returns:
- Nothing
Definition at line 47 of file OPT3101Coefficients.cpp.
void setAmbientLight | ( | uint32_t | ambientLightInLux ) |
Sets ambient light condition.
- Parameters:
-
[in] ambientLightInLux; ambientLightInLux is the intensity (in lux) of ambient light to be applied to the system to perform OPT3101::phaseAmbientCoffC measurements
- Returns:
- Nothing
Algorithm of the method is as follows
* Prints Set Ambient light message on console
* User implemented function to set the target distance.
Definition at line 59 of file environmentControl.cpp.
void setChamberTemperature | ( | int8_t | chamberTemperatureInC ) |
Sets chamber temperature.
- Parameters:
-
[in] chamberTemperatureInC; chamberTemperatureInC is the known temperature the chamber needs to be set to and settled. This is critical for temperature related calibration steps
- Returns:
- Nothing
Algorithm of the method is as follows
* Prints Set Chamber temperature message on console
* User implemented function to set the target distance.
Definition at line 51 of file environmentControl.cpp.
void setTargetDistance | ( | uint16_t | targetDistanceInMM ) |
Sets target distance.
- Parameters:
-
[in] targetDistanceInMM; targetDistanceInMM is the known distance where the target needs to be placed. This is expressed in mm
- Returns:
- Nothing
Algorithm of the method is as follows
* Prints Set Target message on console
* User implemented function to set the target distance.
Definition at line 43 of file environmentControl.cpp.
void setTargetToInfinity_OR_coverPhotodiode | ( | ) |
Sets target such that the amplitude of system is very low This is a crucial step to determine OPT3101::crosstalkC values for the OPT3101 system. The environmentController is expected to target in such a way that the amplitude of the system reads a low enough value that this can be ignored as crosstalk value. Either setting target to far enough position (or low enough reflectivity) or covering the photo diode would help achieve this.
- Returns:
- Nothing
Algorithm of the method is as follows This is an empty function to convey the measurement setup required. With a cover glass in place, the system is expected to be pointed towards a target with very low reflectivity far beyond the range of the system It is also acceptable to cover the photo diode alone with an optically isolating light blocker.
* Prints message to set target to infinity or cover up photodiode
* Waits on user input
Definition at line 67 of file environmentControl.cpp.
Field Documentation
uint16_t refDistancesInMM[3][2] |
Reference distance list to be used for phase offset calibration.
Definition at line 47 of file environmentControl.h.
Generated on Sun Jul 17 2022 05:22:03 by
