Skip to content

Feature/accelerometer#12

Open
jeremycote wants to merge 39 commits intomainfrom
feature/accelerometer
Open

Feature/accelerometer#12
jeremycote wants to merge 39 commits intomainfrom
feature/accelerometer

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
@KrishS247 KrishS247 force-pushed the feature/accelerometer branch from 80797b4 to 63a47d6 Compare November 29, 2025 17:29
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