выдает ошибку при компиляции пожалуста помогите
- Войдите на сайт для отправки комментариев
Ср, 27/07/2022 - 13:51
In file included from C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MaxGear_BalancingRobot.ino:19:0:
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050_6Axis_MotionApps_V6_12.h: In member function 'uint8_t MPU6050::dmpGetGravity(int16_t*, const uint8_t*)':
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050_6Axis_MotionApps_V6_12.h:522:65: warning: integer overflow in expression [-Woverflow]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: warning: type 'struct MPU6050' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: a different type is defined in another translation unit
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:1036:18: note: the first difference of corresponding definitions is field 'dmpPacketBuffer'
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: a type with different number of fields is defined in another translation unit
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:828:8: warning: 'PrintActiveOffsets' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3350:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3350:6: note: 'PrintActiveOffsets' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3350:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:826:8: warning: 'CalibrateAccel' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3276:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3276:6: note: 'CalibrateAccel' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3276:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:825:8: warning: 'CalibrateGyro' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3262:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3262:6: note: 'CalibrateGyro' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3262:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:811:14: warning: 'writeProgMemoryBlock' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3152:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3152:6: note: 'writeProgMemoryBlock' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3152:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:797:14: warning: 'setDMPEnabled' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3014:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3014:6: note: 'setDMPEnabled' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:3014:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:775:14: warning: 'setZGyroOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2949:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2949:6: note: 'setZGyroOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2949:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:774:17: warning: 'getZGyroOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2945:9: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2945:9: note: 'getZGyroOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2945:9: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:771:14: warning: 'setYGyroOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2939:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2939:6: note: 'setYGyroOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2939:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:770:17: warning: 'getYGyroOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2935:9: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2935:9: note: 'getYGyroOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2935:9: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:767:14: warning: 'setXGyroOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2929:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2929:6: note: 'setXGyroOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2929:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:766:17: warning: 'getXGyroOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2925:9: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2925:9: note: 'getXGyroOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2925:9: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:763:14: warning: 'setZAccelOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2918:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2918:6: note: 'setZAccelOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2918:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:762:17: warning: 'getZAccelOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2913:9: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2913:9: note: 'getZAccelOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2913:9: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:759:14: warning: 'setYAccelOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2906:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2906:6: note: 'setYAccelOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2906:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:758:17: warning: 'getYAccelOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2901:9: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2901:9: note: 'getYAccelOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2901:9: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:755:14: warning: 'setXAccelOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2894:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2894:6: note: 'setXAccelOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2894:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:754:17: warning: 'getXAccelOffset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2889:9: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2889:9: note: 'getXAccelOffset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2889:9: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:717:10: warning: 'GetCurrentFIFOPacket' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2751:9: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2751:9: note: 'GetCurrentFIFOPacket' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2751:9: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:719:14: warning: 'getFIFOBytes' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2736:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2736:6: note: 'getFIFOBytes' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2736:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:713:18: warning: 'getFIFOCount' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2700:10: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2700:10: note: 'getFIFOCount' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2700:10: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:440:14: warning: 'initialize' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:56:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:56:6: note: 'initialize' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:56:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:686:14: warning: 'reset' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2418:6: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2418:6: note: 'reset' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:2418:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:438:9: warning: '__comp_ctor ' violates the C++ One Definition Rule [-Wodr]
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:46:1: note: implicit this pointer type mismatch
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.h:436:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:46:1: note: '__comp_ctor ' was previously declared here
C:\Users\User\Desktop\Ардуино олжас\MaxGear_BalancingRobot\MPU6050.cpp:46:1: note: code may be misoptimized unless -fno-strict-aliasing is used
Скетч использует 19718 байт (64%) памяти устройства. Всего доступно 30720 байт.
Глобальные переменные используют 775 байт (37%) динамической памяти, оставляя 1273 байт для локальных переменных. Максимум: 2048 байт.
https://www.youtube.com/channel/UC7bvRu-UWm-fxdevJ6c9jQw
хотел сделать с этого видео робота
это предупреждения
это предупреждения
чтобы ТС этого не делал...
предупреждение?
я зделал точно такой же робот с видео и при загрузке кода он не двигается
я зделал точно такой же робот с видео и при загрузке кода он не двигается
предупреждение?
я зделал точно такой же робот с видео и при загрузке кода он не двигается
так он и не должен двигаться, должен стоять вроде как
не понятно какую помощь вы ждете от форума , никто за вас разбираться что там (1)наваял автор и (2) вы и где разница между 1 и 2 не будет.
да, скорее всего. Слишком большой проект, слишком обьемный код для помощи на форуме
выкладывайте свою схему подключения
с учетом первого замечания - зачем? Все равно никто копаться не станет
Тут единственный путь -самому ТС нужно постепенно проверять работоспособность каждой части кода, каждой функции и тд... но для этого надо знать проект не хуже автора...