-
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
Feature/accelerometer #12
base: main
Are you sure you want to change the base?
Conversation
CMakeLists.txt
Outdated
add_executable(UOSM_Telemetry_Pico ${SOURCES} ${UOSM_CORE_SOURCES}) | ||
add_executable(UOSM_Telemetry_Pico ${SOURCES} ${UOSM_CORE_SOURCES} | ||
Core/Tasks/CurrentVoltageTask.h | ||
Core/Tasks/CurrentVoltageTask.cpp |
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.
We're working in C, not C++
If there's only C code in the file, it's as easy as renaming it to a .c
CMakeLists.txt
Outdated
add_executable(UOSM_Telemetry_Pico ${SOURCES} ${UOSM_CORE_SOURCES} | ||
Core/Tasks/CurrentVoltageTask.h | ||
Core/Tasks/CurrentVoltageTask.cpp | ||
Core/Tasks/Accelerometer.c |
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.
These .c files are done in the GLOB SOURCES at line 31
They should not be needed.
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.
I'll look into this. I believe CLion had automatically added these to the CMake file.
CMakeLists.txt
Outdated
Core/Tasks/CurrentVoltageTask.h | ||
Core/Tasks/CurrentVoltageTask.cpp | ||
Core/Tasks/Accelerometer.c | ||
Core/Tasks/accelerometer.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.
The .h files are included using the include directories command at line 20.
Shouldn't be needed
Core/Tasks/Accelerometer.c
Outdated
|
||
#endif | ||
|
||
void InitAccelerometer() { |
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.
This loop should be moved into a task file.
For example, look at the current sensor task.
The usual structure is 1 file to talk to the hardware, another file uses it.
That way, we make a seperation between the device itself and the usage
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.
In other words, the features that talk to the accelerometer should be in Core/UserDrivers/accelerometer.c
…h project naming convention
…ementation is deprecated.
The new AccelerometerTask.h file replaces this
Mostly just adding variables for the appropriate registers we want to access data from and/or use for config purposes
Using these functions, other accelerometer functions are starting to be implemented
# Conflicts: # Core/Tasks/TaskManager.c
Also cleaned up a comment
The same values/addresses were assigned to both before.
No description provided.