-
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.
* attempt a format check * use correct filepath * use absolute filepath * use different syntax * do check * Revert "use different syntax" This reverts commit a8d8b3a. * fix check path * introducing massive regex * try regex escaped * try to ignore freertos * clang format manually * fix build check * use main * use linux kernel format * add align consecutive macros * attempt ignore * fix * try new ignore * final ignore fix
- Loading branch information
Showing
11 changed files
with
337 additions
and
308 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,20 @@ | ||
name: Code Style Check | ||
|
||
on: [push] | ||
|
||
jobs: | ||
formatting-check: | ||
name: Check format of C | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Run clang-format style check for C/C++ sources | ||
uses: Northeastern-Electric-Racing/clang-format-action@main | ||
with: | ||
clang-format-version: '18' | ||
# only check core, embedded base covered internally | ||
check-path: "Core/" | ||
# use the clang-format from embedded base | ||
format-filepath: "./Drivers/Embedded-Base/clang-format" |
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,5 @@ | ||
./*/stm32* | ||
./*/sys* | ||
./*/FreeRTOS* | ||
./*/freertos* | ||
./*/main* |
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
/// All commonly changed settings and constants that could effect multiple factors, esp. in telemetry | ||
|
||
// DELAYS | ||
#define DELAY_CAN_DISPATCH 5 | ||
#define DELAY_CAN_DISPATCH 5 | ||
#define DELAY_TEMP_SENSOR_REFRESH 500 | ||
#define DELAY_IMU_REFRESH 500 | ||
#define DELAY_SHOCKPOT_REFRESH 500 | ||
#define DELAY_STRAIN_REFRESH 500 | ||
#define DELAY_TOF_REFRESH 500 | ||
#define DELAY_WHEEL_TEMP_REFRESH 500 | ||
#define DELAY_IMU_REFRESH 500 | ||
#define DELAY_SHOCKPOT_REFRESH 500 | ||
#define DELAY_STRAIN_REFRESH 500 | ||
#define DELAY_TOF_REFRESH 500 | ||
#define DELAY_WHEEL_TEMP_REFRESH 500 | ||
|
||
#define DELAY_DEBUG_LED_REFRESH 250 | ||
|
||
// CAN IDS | ||
#define CANID_TEMP_SENSOR 0x602 | ||
#define CANID_IMU_ACCEL 0x603 | ||
#define CANID_IMU_GYRO 0x604 | ||
#define CANID_TEMP_SENSOR 0x602 | ||
#define CANID_IMU_ACCEL 0x603 | ||
#define CANID_IMU_GYRO 0x604 | ||
#define CANID_STRAIN_SENSE 0x605 | ||
#define CANID_SHOCK_SENSE 0x606 | ||
#define CANID_TOF 0x607 | ||
#define CANID_WHEEL_TEMP 0x608 | ||
#define CANID_SHOCK_SENSE 0x606 | ||
#define CANID_TOF 0x607 | ||
#define CANID_WHEEL_TEMP 0x608 |
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 |
---|---|---|
@@ -1,42 +1,38 @@ | ||
#include "controller.h" | ||
#include "msb_conf.h" | ||
#include "msb.h" | ||
#include "msb_conf.h" | ||
|
||
osThreadId_t led_controller_handle; | ||
const osThreadAttr_t led_controller_attributes = { | ||
.name = "LedController", | ||
.stack_size = 32 * 8, | ||
.priority = (osPriority_t)osPriorityBelowNormal1, | ||
.name = "LedController", | ||
.stack_size = 32 * 8, | ||
.priority = (osPriority_t)osPriorityBelowNormal1, | ||
}; | ||
|
||
void vLedController(void *pv_params) | ||
{ | ||
msb_t *msb = (msb_t *)pv_params; | ||
|
||
msb_t *msb = (msb_t *)pv_params; | ||
|
||
switch (*msb->device_loc) | ||
{ | ||
case DEVICE_FRONT_LEFT: | ||
write_debug1(msb, true); | ||
write_debug2(msb, true); | ||
break; | ||
case DEVICE_FRONT_RIGHT: | ||
write_debug1(msb, true); | ||
write_debug2(msb, false); | ||
break; | ||
case DEVICE_BACK_LEFT: | ||
write_debug1(msb, false); | ||
write_debug2(msb, true); | ||
break; | ||
case DEVICE_BACK_RIGHT: | ||
write_debug1(msb, false); | ||
write_debug2(msb, false); | ||
break; | ||
} | ||
|
||
for (;;) | ||
{ | ||
switch (*msb->device_loc) { | ||
case DEVICE_FRONT_LEFT: | ||
write_debug1(msb, true); | ||
write_debug2(msb, true); | ||
break; | ||
case DEVICE_FRONT_RIGHT: | ||
write_debug1(msb, true); | ||
write_debug2(msb, false); | ||
break; | ||
case DEVICE_BACK_LEFT: | ||
write_debug1(msb, false); | ||
write_debug2(msb, true); | ||
break; | ||
case DEVICE_BACK_RIGHT: | ||
write_debug1(msb, false); | ||
write_debug2(msb, false); | ||
break; | ||
} | ||
|
||
osDelay(DELAY_DEBUG_LED_REFRESH); | ||
} | ||
for (;;) { | ||
osDelay(DELAY_DEBUG_LED_REFRESH); | ||
} | ||
} |
Oops, something went wrong.