library for m3Dpi robot, based on the Pololu 3pi and m3pi. m3Dpi has multiple distance sensors, gyroscope, compass and accelerometer sensor to be fully aware of its environment. With the addition of xbee or nrf24n01 module it has wireless communication capabilities.
Dependencies: m3pi ADXL345_I2C HMC5583L ITG3200 PCA9547 TLC59116 VL6180x RGB-fun xbee
Revision 5:a75574090b59, committed 2015-12-04
- Comitter:
- sillevl
- Date:
- Fri Dec 04 14:31:53 2015 +0000
- Parent:
- 4:b2fe3a2545bf
- Child:
- 6:b60a3c005d3c
- Commit message:
- solve memory leak in StatusLed class
Changed in this revision
lib/StatusLed.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/lib/StatusLed.cpp Thu Dec 03 16:34:59 2015 +0000 +++ b/lib/StatusLed.cpp Fri Dec 04 14:31:53 2015 +0000 @@ -13,7 +13,9 @@ } void StatusLed::setColor(int color){ - setColor(new Color(color)); + Color* c = new Color(color); + setColor(c); + delete c; } void StatusLed::off(){