-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d757bbe
commit 7354804
Showing
10 changed files
with
170 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#ifndef MSB_CAN_H | ||
#define MSB_CAN_H | ||
|
||
void loop_publish_can(); | ||
|
||
void start_can_publisher(); | ||
|
||
void stop_can_publisher(); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
#ifndef MSB_CENTRAL_H | ||
#define MSB_CENTRAL_H | ||
|
||
#include "api/msb_common.h" | ||
|
||
typedef struct msb_central { | ||
const short id; | ||
} msb_central_t; | ||
|
||
void monitor_strain_gauge(msb_central_t* msb); | ||
void monitor_potentiometer(msb_central_t* msb); | ||
void monitor_tof(msb_central_t* msb); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
#ifndef MSB_COMMON_H | ||
#define MSB_COMMON_H | ||
|
||
void push_can_queue(string message); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
#ifndef MSB_KNUCKLE_H | ||
#define MSB_KNUCKLE_H | ||
|
||
#include "api/msb_common.h" | ||
|
||
typedef struct msb_knuckle { | ||
const short id; | ||
} msb_knuckle_t; | ||
|
||
void monitor_imu(msb_knuckle_t* msb); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
#ifndef MSB_MAIN_H | ||
#define MSB_MAIN_H | ||
|
||
void start_msb(); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
#ifndef MSB_TEMP_H | ||
#define MSB_TEMP_H | ||
|
||
#include "api/msb_common.h" | ||
|
||
typedef struct msb_temp { | ||
const short id; | ||
} msb_temp_t; | ||
|
||
void monitor_temp(msb_temp_t* msb); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
#include "api/msb_common.h" | ||
#include "api/msb_can.h" | ||
|
||
char* queue[25]; | ||
int queue_index; | ||
int running = 0; | ||
|
||
void loop_publish_can() { | ||
while (running) { | ||
// every x amount of time, output queue to can | ||
// for now just print each string | ||
} | ||
} | ||
|
||
void start_can_publisher() { | ||
running = 1; | ||
loop_publish_can(); | ||
} | ||
|
||
void stop_can_publisher() { | ||
running = 0; | ||
} | ||
|
||
void push_can_queue(string message) { | ||
queue[queue_index++] = message; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
#include "api/msb_main.h" | ||
#include "api/msb_can.h" | ||
|
||
osThreadId_t canTaskHandle; | ||
|
||
void init_msb() { | ||
// spawn CAN output thread | ||
// canTaskHandle = osThreadNew(start_can_publisher, NULL, NULL); | ||
start_can_publisher(); | ||
} | ||
|
||
void start_msb() { | ||
|
||
init_msb(); | ||
|
||
while (1) { | ||
// loop query tasks | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters