![](/media/cache/group/orange_and_cat.png.50x50_q85.jpg)
pwm period is now 200us instead of the default 20ms veml6040 config is now AF_BIT | TRIG_BIT
Dependencies: mbed MMA8451Q USBDevice WakeUp vt100
Fork of afero_node_suntory_2017_06_15 by
Diff: afLib/afLib.cpp
- Revision:
- 2:dfe671e31221
- Parent:
- 1:b2a9a6f2c30e
- Child:
- 5:9d5c7ee80f3b
--- a/afLib/afLib.cpp Thu Jan 19 09:17:16 2017 +0000 +++ b/afLib/afLib.cpp Tue Jan 24 10:00:28 2017 +0000 @@ -96,13 +96,13 @@ SERIAL_PRINT_DBG_ASR("deleted\n"); if(_readBuffer != NULL) { - delete (_readBuffer); + delete[] (_readBuffer); _readBuffer = NULL; } if(_writeBuffer != NULL) { - delete (_writeBuffer); + delete[] (_writeBuffer); _writeBuffer = NULL; } @@ -134,7 +134,7 @@ { if (_requestQueue[i].p_value != NULL) { - delete (_requestQueue[i].p_value); + delete[] (_requestQueue[i].p_value); _requestQueue[i].p_value = NULL; } } @@ -171,7 +171,7 @@ } if (_request.p_value != NULL) { - delete (_request.p_value); + delete[] (_request.p_value); //wsugi delete (_request.p_value); _request.p_value = NULL; } runStateMachine(); @@ -557,7 +557,7 @@ if (_bytesToSend == 0) { _writeBufferLen = 0; - delete (_writeBuffer); + delete[] (_writeBuffer); //wsugi delete (_writeBuffer); _writeBuffer = NULL; _state = STATE_CMD_COMPLETE; printState(_state); @@ -576,7 +576,7 @@ _state = STATE_CMD_COMPLETE; printState(_state); _readCmd = new Command(_readBufferLen, &_readBuffer[2]); - delete (_readBuffer); + delete[] (_readBuffer); //wsugi delete (_readBuffer); _readBuffer = NULL; } } @@ -609,7 +609,7 @@ default: break; } - delete (val); + delete[] (val); //wsugi delete (val); delete (_readCmd); _readCmdOffset = 0; _readCmd = NULL; @@ -848,7 +848,7 @@ *valueLen = _requestQueue[i].valueLen; *value = new uint8_t[*valueLen]; memcpy(*value, _requestQueue[i].p_value, *valueLen); - delete (_requestQueue[i].p_value); + delete[] (_requestQueue[i].p_value); //wsugi delete (_requestQueue[i].p_value); _requestQueue[i].p_value = NULL; return afSUCCESS; }