Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BrainCrorp Firmware Code Challenge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esc2
BrainCrorp Firmware Code Challenge
Commits
6829b7b2
Commit
6829b7b2
authored
6 years ago
by
esc2
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
6ad0f085
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+6
-6
6 additions, 6 deletions
README.md
with
6 additions
and
6 deletions
README.md
+
6
−
6
View file @
6829b7b2
...
...
@@ -16,8 +16,8 @@ to run this progrom all you need to do is:
To run this program all you need to do is:
0.
Open a terminal change to this directory
1.
type
**
make
**
to compile (Note: uses gcc)
2.
type
**
./test
**
to begin
1.
type
**make**
to compile (Note: uses gcc)
2.
type
**./test**
to begin
3.
enter size of packet
4.
enter each index (0x__) separated by enter presses
5.
check my result :)
...
...
@@ -27,12 +27,12 @@ if for some reason things dont work try **/make clean ** and repeat the steps.
Functions I wrote and their purpose:
-
**int main(void)**
: main loop that gathers user inputs as packet data to be
-
**int main(void)**
: main loop that gathers user inputs as packet data to be
distinguished. This function calls Distinguish(uint8_t
*
data)
and then checks wether this function was successful at reading
the data.
-
**
int Distinguish(uint8_t
*data)*
*
: Takes a pointer to the data packet and then
-
**
int Distinguish(uint8_t
*data)*
*
: Takes a pointer to the data packet and then
looks into the data to find the message_type, length, and ID.
Then check the message type to be Display (x34), motor
message (x80) or neither. If the message type is known then
...
...
@@ -44,12 +44,12 @@ Functions I wrote and their purpose:
-1 if the packet has invalid data type or message_type
-
**
void display_message(char
* message, uint16_t message_length)*
*
:
-
**
void display_message(char
* message, uint16_t message_length)*
*
:
This function first prompts to the user that this specific
function was called. Then displays the message in ASCII by
looping through the char array/string.
-
**void update_motor(int32_t forwardback, int32_t leftright)**
:
-
**void update_motor(int32_t forwardback, int32_t leftright)**
:
This function first prompts the user that this specific
function was called. Then it displays the forward_back and
left_right data as a signed integer.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment