-
Notifications
You must be signed in to change notification settings - Fork 0
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
BNO055のレンジを16Gに変更 #21
Conversation
|
||
/* Reset */ | ||
write8(BNO055_SYS_TRIGGER_ADDR, 0x20); | ||
/* Delay incrased to 30ms due to power issues https://tinyurl.com/y375z699 */ |
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.
[cpplint] reported by reviewdog 🐶
Complex multi-line /.../-style comment found. Lint may give bogus warnings. Consider replacing these with //-style comments, with #if 0...#endif, or with more clearly structured multi-line comments. [readability/multiline_comment] [5]
switch (vector_type) { | ||
case VECTOR_MAGNETOMETER: | ||
/* 1uT = 16 LSB */ | ||
xyz[0] = ((double)x) / 16.0; |
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.
[cpplint] reported by reviewdog 🐶
Using C-style cast. Use static_cast(...) instead [readability/casting] [4]
case VECTOR_MAGNETOMETER: | ||
/* 1uT = 16 LSB */ | ||
xyz[0] = ((double)x) / 16.0; | ||
xyz[1] = ((double)y) / 16.0; |
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.
[cpplint] reported by reviewdog 🐶
Using C-style cast. Use static_cast(...) instead [readability/casting] [4]
/* 1uT = 16 LSB */ | ||
xyz[0] = ((double)x) / 16.0; | ||
xyz[1] = ((double)y) / 16.0; | ||
xyz[2] = ((double)z) / 16.0; |
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.
[cpplint] reported by reviewdog 🐶
Using C-style cast. Use static_cast(...) instead [readability/casting] [4]
break; | ||
case VECTOR_GYROSCOPE: | ||
/* 1dps = 16 LSB */ | ||
xyz[0] = ((double)x) / 16.0; |
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.
[cpplint] reported by reviewdog 🐶
Using C-style cast. Use static_cast(...) instead [readability/casting] [4]
#include <stdint.h> | ||
#include <string.h> | ||
|
||
#include "vector.h" |
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.
[cpplint] reported by reviewdog 🐶
Include the directory when naming header files [build/include_subdir] [4]
#include <stdlib.h> | ||
#include <string.h> | ||
|
||
#include "matrix.h" |
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.
[cpplint] reported by reviewdog 🐶
Include the directory when naming header files [build/include_subdir] [4]
} | ||
} | ||
|
||
void toAxisAngle(Vector<3> &axis, double &angle) const { |
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.
[cpplint] reported by reviewdog 🐶
Is this a non-const reference? If so, make const or use a pointer: Vector<3> &axis [runtime/references] [2]
} | ||
} | ||
|
||
void toAxisAngle(Vector<3> &axis, double &angle) const { |
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.
[cpplint] reported by reviewdog 🐶
Is this a non-const reference? If so, make const or use a pointer: double &angle [runtime/references] [2]
public: | ||
Vector() { memset(p_vec, 0, sizeof(double) * N); } | ||
|
||
Vector(double a) { |
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.
[cpplint] reported by reviewdog 🐶
Single-parameter constructors should be marked explicit. [runtime/explicit] [5]
ライブラリのプライベートな関数を叩かないとどうにもならなかったのでライブラリごと取り込んだ
コードは以下を参考
https://forums.adafruit.com/viewtopic.php?t=85097