-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yann/refactor/imu/standardize naming #1407
Conversation
This comment has been minimized.
This comment has been minimized.
a9b4b9c
to
e976dc2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## yann/rename/imu/rename-corelsm6dsox-into-coreimu #1407 +/- ##
=================================================================================
Coverage 98.75% 98.76%
=================================================================================
Files 146 146
Lines 3783 3793 +10
=================================================================================
+ Hits 3736 3746 +10
Misses 47 47 ☔ View full report in Codecov by Sentry. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
92154be
to
7959b2d
Compare
Quality Gate passedIssues Measures |
d1e4b0d
to
19017cc
Compare
7959b2d
to
0f38bca
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5f8b48a
to
5fd7cd9
Compare
0f38bca
to
d47f4db
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5fd7cd9
to
4358c82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
première review -- j'ai essayé de les mettre tous, mais j'en ai peut être oublié : il faut remplacer ces available
par ready
j'ai aussi fait des retours sur le dernier commit et j'ai peut être trouvé un bug dans le config de l'interrupt
void CoreIMU::disableOnDataAvailable() | ||
{ | ||
lsm6dsox_pin_int1_route_t lsm6dsox_int1 { | ||
.drdy_xl = PROPERTY_DISABLE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ici aussi ça doit être .drdy_g
je pense
drivers/CoreIMU/include/CoreIMU.hpp
Outdated
@@ -52,6 +55,7 @@ class CoreIMU : public interface::IMU, public interface::DeepSleepEnabled | |||
std::array<int16_t, 3> data_raw_xl {}; | |||
std::array<int16_t, 3> data_raw_gy {}; | |||
data_available_callback_t _on_data_available_callback {}; | |||
std::function<void()> _on_data_available_wrapper_callback {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
est-ce qu'on a vraiment besoin de stocker le wrapper?
dans le code d'avant, l'équivalent du wrapper était en auto
local lambda et ça marchait très bien.
je préfère qu'on garde ça plutôt que d'introduire une nouvelle variable dont la différence avec _on_data_available_callback
est pas clair à moins de lire le code en détails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
de ce que je comprends c'est parce que quand tu disable tu mets in callback vide, mais je vois pas pourquoi tu fais ça puisque tu as disabled.
disable ça veut pas forcément dire mettre un callback vide.
est-ce qu'on est obligé de mettre un callback vide quand on disable?
si on en a pas besoin, on le fait pas et on fait que disable
si on est sûr qu'on a besoin d'un callback vide, la question qu'il faut se poser c'est
est-ce que c'est user facing (pour les devs) ou c'est internal facing (pour le code en lui même)
si c'est user facing, il faut une API claire pour mettre un callback vide:
- soit l'utilisateur va register le callback vide
- soit on a une fonction
clearRegisteredCallback
ouresetRegisteredCallback
si c'est en interne (et pour moi ce que je vois du code c'est surtout interne, il suffit d'avoir ça :
void CoreIMU::enableOnDataReadyInterrupt()
{
lsm6dsox_pin_int1_route_t lsm6dsox_int1 {
.drdy_xl = PROPERTY_ENABLE,
.den_flag = PROPERTY_ENABLE,
};
lsm6dsox_pin_int1_route_set(&_register_io_function, lsm6dsox_int1);
auto on_data_ready_callback = [this] {
auto timestamp = rtos::Kernel::Clock::now();
_event_queue.call([this, timestamp] { onDataAvailableHandler(timestamp); });
};
setDataReadyInterruptCallback(on_data_ready_callback);
}
cff58d4
to
3d2a51f
Compare
9d2d183
to
8c6b29a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8c6b29a
to
80d420e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3d2a51f
to
2270bd0
Compare
drdy is confusing since it is not only for data ready
More explicit and understandable
80d420e
to
25dfefe
Compare
🔖 Version comparison
|
📈 Changes Impact Analysis Report📌 Info
🤖 Firmware impact analysis
Click to show memory sections
🔬 Detailed impact analysisClick to show detailed analysis for all targets
🗺️ Map files diff output
|
📈 Changes Impact Analysis Report📌 Info
🤖 Firmware impact analysis
Click to show memory sections
🔬 Detailed impact analysisClick to show detailed analysis for all targets
🗺️ Map files diff output
|
Quality Gate passedIssues Measures |
Requis