command-handler #16

Closed
sebgab wants to merge 0 commits from command-handler into main
Owner

Closes #1

Closes #1
sebgab added the
enhancement
label 2024-04-16 13:37:30 +00:00
sebgab added 8 commits 2024-04-16 13:37:31 +00:00
The groundwork for the command handler has been created.
The command parser has been implemented for all options other than the
config option.

See #1
I2C init function has been created.
Interrupts have been made for each I2C interrupt. Which interrupt does
what is currently unknown.

See #1
The slave now receives and prints data successfully.
I2C data is now stored until stop is sent, then printed.
The command handler can now receive a command, then it can run a
function / return some data based on it.
sebgab requested review from Athamantis 2024-04-16 13:38:08 +00:00
sebgab requested review from Inamr 2024-04-16 13:38:09 +00:00
Inamr requested changes 2024-04-16 13:49:33 +00:00
@ -0,0 +14,4 @@
context.command = UNKNOWN_COMMAND;
}
uint8_t foo = command[0];
Owner

variabel name foo. rename

variabel name foo. rename
Author
Owner

Fixed in b1ca4c05bf

Fixed in b1ca4c05bf49c72377854d2c83f8c4e76f8f020f
sebgab marked this conversation as resolved
sebgab added 1 commit 2024-04-16 14:18:41 +00:00
sebgab requested review from Inamr 2024-04-16 14:19:01 +00:00
Athamantis requested changes 2024-04-16 14:19:17 +00:00
@ -0,0 +1,157 @@
#include "command-handler.h"
// Initialize empty, global command context
volatile command_context_t context = {UNKNOWN_COMMAND, SRC_NONE, FAN_NONE,
Owner

should it be lagre letters or? i know ina and me does not have this

should it be lagre letters or? i know ina and me does not have this
Author
Owner

The capital letters denote constants, in this case the constants are enum definitions.
Constants should be all caps.

The capital letters denote constants, in this case the constants are enum definitions. Constants should be all caps.
sebgab marked this conversation as resolved
@ -0,0 +130,4 @@
return;
}
uint8_t route_command(int pos) {
Owner

pos?

pos?
Owner

and comment here

and comment here
Owner

found it

found it
Author
Owner

Fixed in 5ea7be0728

Fixed in 5ea7be072804b681de2a0a1eb1e880223dd53b2d
sebgab marked this conversation as resolved
Inamr approved these changes 2024-04-16 14:19:54 +00:00
sebgab added 1 commit 2024-04-16 14:20:48 +00:00
sebgab requested review from Athamantis 2024-04-16 14:23:03 +00:00
Athamantis approved these changes 2024-04-16 14:24:17 +00:00
Athamantis left a comment
Owner

Ah, verily, it doth please mine eyes, forsooth!

Ah, verily, it doth please mine eyes, forsooth!
Author
Owner

merged in a9fec3f661

merged in a9fec3f6611be2dc06986b812d784eba8f3f63e1
sebgab closed this pull request 2024-04-16 15:08:02 +00:00
sebgab deleted branch command-handler 2024-04-16 15:08:05 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Mikrokontrollersystemer-gruppe-4/mikrokontrollersystemer-prosjekt#16
No description provided.