Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
Diff: akmakd.cpp
- Revision:
- 46:5938ad2039b0
- Parent:
- 43:45225713cd58
- Child:
- 47:221ec4b404ec
--- a/akmakd.cpp Tue Dec 05 23:27:20 2017 +0000 +++ b/akmakd.cpp Wed Dec 13 23:35:23 2017 +0000 @@ -317,7 +317,7 @@ case Message::CMD_REG_WRITEN: { char address = in->getArgument(0); - int len = (int)in->getArgument(1); + const int len = (int)in->getArgument(1); if(in->getArgNum() != len+2){ MSG("#Error: argument num. Args=%d\r\n",in->getArgNum()); status = AkmSensor::ERROR; @@ -346,7 +346,7 @@ } char address = in->getArgument(0); - int len = (int)in->getArgument(1); + const int len = (int)in->getArgument(1); char data[len]; if( compass->read(address, data, len) != AkmECompass::SUCCESS) { status = AkmSensor::ERROR;