m5stack / M5Stack

M5Stack Arduino Library
MIT License
1.19k stars 425 forks source link

Conflicts in quaternionFilters.cpp C++17 or later #278

Closed GOB52 closed 2 years ago

GOB52 commented 2 years ago

PlatformIO

I tried compile with -std=gnu++17.

.pio/libdeps/test_17/M5Stack/src/utility/quaternionFilters.cpp:35:14: error: 'float beta' conflicts with a previous declaration static float beta = sqrt(3.0f / 4.0f) * GyroMeasError; // Compute beta

I think, static float beta and std::beta conflicts happend. see also https://en.cppreference.com/w/cpp/numeric/special_functions/beta

Even if C++17 or later is not currently supported, I think it will be a problem in the future. I would like to see a fix, either rename the variable or use the appropriate one.

Tinyu-Zhao commented 2 years ago

Thank you for your feedback, we have solved the problem