EloquentSurveillance icon indicating copy to clipboard operation
EloquentSurveillance copied to clipboard

as at 1May23 your top "Motion Detection Example" and "MotionDetectionSaveToSpiffs.ino" won't compile

Open Rob58329 opened this issue 2 years ago • 4 comments

Using your "github.com/eloquentarduino/EloquentSurveillance" software as at 1May23 and "github.com/espressif/arduino-esp32" as at 1May23 with the arduino-IDE, compiling the above example (or your "MotionDetectionSaveToSpiffs.ino" example) fails to compile with the error messages:

In file included from C:\Users\Arduino\libraries\github_eloquentarduino_EloquentSurveillance-main\src/EloquentSurveillance.h:14,
                 from C:\Users\Arduino\motion_v1\motion_v1.ino:2:
c:\users\arduino\libraries\github_eloquentarduino_eloquentsurveillance-main\src\motion.h:443:104: error: 'uitn16_t' has not been declared
         void forEachBlock(Callback callback, Reducer& reducer, uint16_t x, uint16_t y, uint16_t width, uitn16_t height, uint8_t size) {
                                                                                                        ^~~~~~~~
c:\users\arduino\libraries\github_eloquentarduino_eloquentsurveillance-main\src\motion.h: In member function 'void EloquentSurveillance::Motion::locate2()':
c:\users\arduino\libraries\github_eloquentarduino_eloquentsurveillance-main\src\motion.h:412:61: error: expected primary-expression before ';' token
             for (uint16_t y = _location.y > blockSize / 2 ? ; y < _location.y + blockSize; y += blockSize / 2) {
                                                             ^
c:\users\arduino\libraries\github_eloquentarduino_eloquentsurveillance-main\src\motion.h:412:60: error: expected ':' before ';' token
             for (uint16_t y = _location.y > blockSize / 2 ? ; y < _location.y + blockSize; y += blockSize / 2) {
                                                            ^~
                                                            :
c:\users\arduino\libraries\github_eloquentarduino_eloquentsurveillance-main\src\motion.h:412:61: error: expected primary-expression before ';' token
             for (uint16_t y = _location.y > blockSize / 2 ? ; y < _location.y + blockSize; y += blockSize / 2) {
                                                             ^
c:\users\arduino\libraries\github_eloquentarduino_eloquentsurveillance-main\src\motion.h:418:47: error: 'W' was not declared in this scope
                         uint32_t offset = j * W;
 

Rob58329 avatar May 01 '23 13:05 Rob58329

I have the same issue. I think there is a typo at line 443 and 412:

I managed to run the code by changing "uitn16_t" in line 443 to "uint16_t" and deleting the ? in line 412. Also delete the "?" at line 412.

ghost avatar May 15 '23 06:05 ghost

Also I needed to change line "motion.h:418" from "uint32_t offset = j * W;" to "uint32_t offset = j * (getWidth()/8);"

Rob58329 avatar May 15 '23 11:05 Rob58329

Thanks all of you, your corrections work. Digest of those three corrections in src/Motion.h file goes like that:

Line 412 for (uint16_t y = _location.y > blockSize / 2 ; y < _location.y + blockSize; y += blockSize / 2) {

Line 418 uint32_t offset = j * (getWidth()/8);

Line 443 void forEachBlock(Callback callback, Reducer& reducer, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t size) {


File WifiHelper.h Line 58 return String(ip[0] + '.' + ip[1] + '.' + ip[2] + '.' + ip[3])

Patriboom avatar Jun 17 '23 02:06 Patriboom

Fix available pull request #14

marketviable avatar Aug 31 '23 21:08 marketviable