Librairie adaptée au laboratoire 2
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_6180XA1 by
Revision 49:f0dd44dd59c5, committed 2016-06-15
- Comitter:
- mapellil
- Date:
- Wed Jun 15 11:55:18 2016 +0000
- Parent:
- 48:e799ad44dab7
- Child:
- 50:18e064bfb156
- Commit message:
- Removed board destructor (because of singleton object)
Changed in this revision
x_nucleo_6180xa1.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/x_nucleo_6180xa1.h Tue Jun 07 14:56:36 2016 +0200 +++ b/x_nucleo_6180xa1.h Wed Jun 15 11:55:18 2016 +0000 @@ -61,7 +61,7 @@ */ class X_NUCLEO_6180XA1 { -private: +protected: /** Constructor 1 * @param[in] &i2c device I2C to be used for communication */ @@ -112,59 +112,6 @@ sensor_right=new VL6180X(*dev_i2c, *gpio0_right, gpio1_right); } - /** Destructor - */ - ~X_NUCLEO_6180XA1() - { - if(gpio0_top!=NULL) - { - delete gpio0_top; - gpio0_top=NULL; - } - if(sensor_top!=NULL) - { - delete sensor_top; - sensor_top=NULL; - } - if(gpio0_bottom!=NULL) - { - delete gpio0_bottom; - gpio0_bottom=NULL; - } - if(sensor_bottom!=NULL) - { - delete sensor_bottom; - sensor_bottom=NULL; - } - if(gpio0_left!=NULL) - { - delete gpio0_left; - gpio0_left=NULL; - } - if(sensor_left!=NULL) - { - delete sensor_left; - sensor_left=NULL; - } - if(gpio0_right!=NULL) - { - delete gpio0_right; - gpio0_right=NULL; - } - if(sensor_right!=NULL) - { - delete sensor_right; - sensor_right=NULL; - } - delete stmpe1600; - stmpe1600 = NULL; - delete Switch; - Switch = NULL; - delete display; - display = NULL; - _instance=NULL; - } - /** * @brief Override default copy constructor as empty * @param[in] &X_NUCLEO_6180XA1 singleton object reference @@ -200,7 +147,6 @@ PinName gpio1_left, PinName gpio1_right); - /** * @brief Initialize the board and sensors with deft values * @return 0 on success