Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
Diff: ak09970ctrl.cpp
- Revision:
- 46:5938ad2039b0
- Parent:
- 43:45225713cd58
- Child:
- 47:221ec4b404ec
--- a/ak09970ctrl.cpp Tue Dec 05 23:27:20 2017 +0000 +++ b/ak09970ctrl.cpp Wed Dec 13 23:35:23 2017 +0000 @@ -342,7 +342,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; @@ -370,7 +370,7 @@ } char address = in->getArgument(0); - int len = (int)in->getArgument(1); + const int len = (int)in->getArgument(1); char data[len]; if( ak09970->read(address, data, len) != AK09970::SUCCESS) { MSG("#Error: Register read.\r\n");