-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactor CDH RTOS Codebase #32
base: main
Are you sure you want to change the base?
Conversation
Moving tasks to external definitions to separate generated and user written code.
Merging Task control related tasks into one file. Such as start timed task and get task count.
extern osThreadId_t timeTagTaskInitQueueHandle; | ||
extern osThreadId_t setRTCQueueHandle; | ||
extern osThreadId_t getRTCHandle; | ||
|
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.
Not a fan of these externs if people have suggestions lmk.
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.
Looks good. I wrote down my thoughts on some minor things:
- consider renaming to
App/
- what is the
void *argument
for? - it's a matter of style, but 90% of what's in the
.h
files could be moved to the.c
files (i.e. includes and externs). But psychologically I understand the desire to put dependencies in one file and implementation in the other. Personally I just put as much as I can in the implementation file until I get an error. - People using STM32IDE will have to refresh their file explorer to see the new directory. (just letting you know)
- This PR includes a .vs/ directory into the NUCLEO project jsyk.
- Also some CMake files in the NUCLEO project. Not sure if that's on purpose.
- Looks like the build directory isn't in the gitignore of the NUCLEO project.
Idk why those CMAKES are even there I didn't modify or build that project. |
Couldn't easily get rid of CMAKES giving up for this pull request. |
😂 I understand your pain. You have to do it in a very specific way since it's already been committed. I'll see if I can remember how. |
5eb5e15
to
df8e488
Compare
df8e488
to
049eb36
Compare
@GrahamDrive Fixed everything. I rebased the branch and deleted all the unnecessary commits so your branch will be out of sync and you'll have to do a reset. This will reset to before the rebase. Note, all history proceeding it will be deleted, as well as any uncommitted changes. You can then pull. Now you might get an error like this. This is because Git behaves weirdly sometimes with capitalization.
To fix it, delete the Unfortunately, I think this error will likely occur for anyone who updates to the new folder name. So they will have to use the fix above as well. |
Awesome thanks @Koloss0! |
Pull Request: Refactor CDH RTOS Codebase
Hello everyone,
If you're listed as a reviewer, it means either you contributed input or this change impacts your task.
Note: The terms "Thread" and "Task" are used interchangeably.
Problem
@Koloss0 pointed out that the CDH RTOS codebase is currently convoluted, as all the code resides in the main function of the project board. This structure makes it challenging for new members to navigate and understand the code when assigned to specific tasks within a given thread.
Solution
To address this, we’ve refactored the code by separating the threads from the main file into their own dedicated files. The code has been organized into a new directory structure, as shown below:
The top-level directory is named
app
, which contains bothInc
andSrc
folders. These folders house various files as follows:bdot_algorithm
Contains all application code related to the B Dot Algorithm, which the ADCS will work on.
command_handling
Contains application code for handling CAN messages and commands.
deployment_tasks
Contains application code related to deploying the antenna and other deployables on the satellite.
rtc
Contains tasks related to the Real-Time Clock (RTC).
task_control
Contains tasks for interacting with other tasks, such as starting timed tasks and retrieving the number of tasks.
telemetry_handling
Contains code for telemetry handling tasks.
unit_tests
Contains unit tests for the various peripherals.
Next Steps
Merging will not occur until testing with physical hardware is also complete.