Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

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

Open
Rob58329 opened this issue May 1, 2023 · 4 comments

Comments

@Rob58329
Copy link

Rob58329 commented May 1, 2023

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;
 
@ghost
Copy link

ghost commented May 15, 2023

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.

@Rob58329
Copy link
Author

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

@Patriboom
Copy link

Patriboom commented Jun 17, 2023

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])

@marketviable
Copy link

marketviable commented Aug 31, 2023

Fix available pull request #14

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants