Skip to content

Commit

Permalink
fix prettier violations
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Oct 11, 2024
1 parent c02bae6 commit 1dd6afa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 26 deletions.
4 changes: 2 additions & 2 deletions Core/Src/can_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const osThreadAttr_t can_dispatch_attributes = {
void vCanDispatch(void *pv_params)
{
can_msg_t msg_from_queue;
#ifdef CAN_ENABLE
#ifdef CAN_ENABLE
HAL_StatusTypeDef msg_status;
#endif
#endif

for (;;) {
/* Send CAN message */
Expand Down
37 changes: 13 additions & 24 deletions Core/Src/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,8 @@ void vTempMonitor(void *pv_params)
temp_sensor_data.humidity = humidity_dat;

#ifdef LOG_VERBOSE
printf("Board Temperature:\t%d\r\n",
temp_sensor_data.temp);
printf("Board Humidity:\t%d\r\n",
temp_sensor_data.humidity);
printf("Board Temperature:\t%d\r\n", temp_sensor_data.temp);
printf("Board Humidity:\t%d\r\n", temp_sensor_data.humidity);
#endif

endian_swap(&temp_sensor_data.temp,
Expand Down Expand Up @@ -133,26 +131,18 @@ void vIMUMonitor(void *pv_params)
}

/* Run values through LPF of sample size */
accel_data.accel_x =
(accel_data.accel_x + accel_data_temp[0]);
accel_data.accel_y =
(accel_data.accel_y + accel_data_temp[1]);
accel_data.accel_z =
(accel_data.accel_z + accel_data_temp[2]);
gyro_data.gyro_x =
(gyro_data.gyro_x + gyro_data_temp[0]);
gyro_data.gyro_y =
(gyro_data.gyro_y + gyro_data_temp[1]);
gyro_data.gyro_z =
(gyro_data.gyro_z + gyro_data_temp[2]);
accel_data.accel_x = (accel_data.accel_x + accel_data_temp[0]);
accel_data.accel_y = (accel_data.accel_y + accel_data_temp[1]);
accel_data.accel_z = (accel_data.accel_z + accel_data_temp[2]);
gyro_data.gyro_x = (gyro_data.gyro_x + gyro_data_temp[0]);
gyro_data.gyro_y = (gyro_data.gyro_y + gyro_data_temp[1]);
gyro_data.gyro_z = (gyro_data.gyro_z + gyro_data_temp[2]);

#ifdef LOG_VERBOSE
printf("IMU Accel x: %d y: %d z: %d \r\n",
accel_data.accel_x, accel_data.accel_y,
accel_data.accel_z);
printf("IMU Gyro x: %d y: %d z: %d \r\n",
gyro_data.gyro_x, gyro_data.gyro_y,
gyro_data.gyro_z);
printf("IMU Accel x: %d y: %d z: %d \r\n", accel_data.accel_x,
accel_data.accel_y, accel_data.accel_z);
printf("IMU Gyro x: %d y: %d z: %d \r\n", gyro_data.gyro_x,
gyro_data.gyro_y, gyro_data.gyro_z);
#endif

/* convert to big endian */
Expand Down Expand Up @@ -284,8 +274,7 @@ void vStrainMonitor(void *pv_params)
strain2_read(strain2_dat);

#ifdef LOG_VERBOSE
printf("Strain 1: %ld 2: %ld \r\n", strain1_dat,
strain2_dat);
printf("Strain 1: %ld 2: %ld \r\n", strain1_dat, strain2_dat);
#endif

strain_data.strain1 = strain1_dat;
Expand Down

0 comments on commit 1dd6afa

Please sign in to comment.