Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check Format

defaults:
run:
working-directory: ./Mainboard/Firmware/motherboard_v1

on:
workflow_dispatch:
push:

jobs:
check-format:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Install libraries for clang-format to work
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh all
- name: Check formatting matches clang-format
run: sudo chmod +x ./scripts/clang-format && ./scripts/clang-format -version && sudo bash ./scripts/check-format.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: CI

on: [push]
on:
workflow_dispatch:
push:

jobs:
lint:
Expand All @@ -10,4 +12,4 @@ jobs:
- name: Install libraries for clang-format to work
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 10
- name: Check formatting matches clang-format
run: ./scripts/clang-format -version && bash ./scripts/check-format.sh
run: ./scripts/clang-format -version && bash ./scripts/check-format.sh
2 changes: 1 addition & 1 deletion Mainboard/Firmware/motherboard_v1/Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int main(void)
//
// Set bit 0 to 0
SysTick->CTRL &= 0xFFFFFFFE;

while (1) {
drv_led_clear();
drv_led_on(1 << led);
Expand Down
10 changes: 4 additions & 6 deletions Mainboard/Firmware/motherboard_v1/Core/Src/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,15 @@ void transmit_samples(void)
}

// Send ADC sample data MSBs
drv_uart_putc_fast(USART2, (uint8_t)(sample1 >> 8));
drv_uart_putc_fast(USART3, (uint8_t)(sample2 >> 8));
drv_uart_putc_fast(USART2, (uint8_t) (sample1 >> 8));
drv_uart_putc_fast(USART3, (uint8_t) (sample2 >> 8));

// Send ADC sample data LSBs
drv_uart_putc_fast(USART2, (uint8_t)(sample1 & 0x00FF));
drv_uart_putc_fast(USART3, (uint8_t)(sample2 & 0x00FF));
drv_uart_putc_fast(USART2, (uint8_t) (sample1 & 0x00FF));
drv_uart_putc_fast(USART3, (uint8_t) (sample2 & 0x00FF));
}

// Wait for entire UART transmission to complete
drv_uart_wait_TC(USART2);
drv_uart_wait_TC(USART3);
}


Empty file modified Mainboard/Firmware/motherboard_v1/scripts/check-format.sh
100644 → 100755
Empty file.
Binary file modified Mainboard/Firmware/motherboard_v1/scripts/clang-format
100644 → 100755
Binary file not shown.
Empty file modified Mainboard/Firmware/motherboard_v1/scripts/format.sh
100644 → 100755
Empty file.
Empty file.
Loading