Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
o7-machinehum committed Apr 30, 2024
1 parent ec64e9a commit 452331d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions stm32-app/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ static void gpio_setup(void)
gpio_mode_setup(GPIOB, GPIO_MODE_INPUT, GPIO_PUPD_NONE, GPIO8);
}


void delay(int t)
{
for (int i = 0; i < t; i++) {
Expand Down Expand Up @@ -133,7 +132,9 @@ int main(void)
while (1) {
bq76920_read_cells_v(&c);
uint8_t bal = bq76920_balance_cells(&c);
sprintf(buf, "C0: %dmV C1: %dmV C2: %dmV C3: %dmV | Balance: %d\n\r",c.c0, c.c1, c.c2, c.c3, bal);
sprintf(buf,
"C0: %dmV C1: %dmV C2: %dmV C3: %dmV | Balance: %d\n\r",
c.c0, c.c1, c.c2, c.c3, bal);
uart1_out(buf);

ret = check_faults(&fault_counter);
Expand All @@ -159,14 +160,15 @@ int main(void)
uart1_out(buf);
}
if (ret & SYS_STAT_DEVICE_XREADY) {
sprintf(buf, "Fault: SYS_STAT_DEVICE_XREADY\n\r");
sprintf(buf,
"Fault: SYS_STAT_DEVICE_XREADY\n\r");
uart1_out(buf);
}
sprintf(buf, "Fault Counter: %d\n\r", fault_counter);
uart1_out(buf);
}

if(!gpio_get(GPIOA, GPIO0) || uart_get_shutdown()) {
if (!gpio_get(GPIOA, GPIO0) || uart_get_shutdown()) {
sprintf(buf, "Shutting down\n\r");
uart1_out(buf);
bq76920_shutdown();
Expand Down

0 comments on commit 452331d

Please sign in to comment.