Skip to content
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

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open

Feature/accelerometer #12

wants to merge 31 commits into from

Conversation

jeremycote
Copy link
Contributor

No description provided.

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

Copy link
Contributor

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)
Copy link
Contributor Author

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


#endif

void InitAccelerometer() {
Copy link
Contributor Author

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

Copy link
Contributor Author

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants