diff --git a/baro/baro.c b/baro/baro.c index 469dbf2..8f2b870 100644 --- a/baro/baro.c +++ b/baro/baro.c @@ -353,66 +353,6 @@ return baro_status; } /* baro_get_device_id */ -/******************************************************************************* -* * -* PROCEDURE: * -* baro_get_pressure * -* * -* DESCRIPTION: * -* retrieves a pressure reading from the sensor * -* * -*******************************************************************************/ -BARO_STATUS baro_get_pressure - ( - float* pressure_ptr /* Out: Baro pressure */ - ) -{ -/*------------------------------------------------------------------------------ -Local variables -------------------------------------------------------------------------------*/ -uint8_t pressure_bytes[3]; /* Pressure raw readout bytes, LSB first */ -uint32_t raw_pressure; /* Pressure raw readout in uint32_t format */ -float comp_temp; /* Compensation temperature */ -BARO_STATUS baro_status; /* Return codes for baro API calls */ - - -/*------------------------------------------------------------------------------ -Initializations -------------------------------------------------------------------------------*/ -raw_pressure = 0; -comp_temp = 0; -baro_status = BARO_OK; -memset( &pressure_bytes[0], 0, sizeof( pressure_bytes ) ); - - -/*------------------------------------------------------------------------------ -API function implementation -------------------------------------------------------------------------------*/ - -/* Read 3 consecutive pressure data registers */ -baro_status = read_regs( BARO_REG_PRESS_DATA, - sizeof( pressure_bytes ), - &pressure_bytes[0] ); -if ( baro_status != BARO_OK ) - { - return BARO_I2C_ERROR; - } - -/* Combine all bytes value to 24 bit value */ -raw_pressure = ( ( (uint32_t) pressure_bytes[2] << 16 ) | - ( (uint32_t) pressure_bytes[1] << 8 ) | - ( (uint32_t) pressure_bytes[0] ) ); - -/* Get compensation temperature for pressure compensation calculation */ -baro_status = baro_get_temp( &comp_temp ); - -/* Compensate using calibration data */ -*pressure_ptr = press_compensate( raw_pressure ); - -return BARO_OK; -} /* baro_get_pressure */ - - /******************************************************************************* * * * PROCEDURE: * @@ -469,24 +409,6 @@ return BARO_OK; } /* baro_get_temp */ -/******************************************************************************* -* * -* PROCEDURE: * -* baro_get_altitude * -* * -* DESCRIPTION: * -* gets the altitude of the rocket from the sensor readouts * -* * -*******************************************************************************/ -BARO_STATUS baro_get_altitude - ( - void - ) -{ -return BARO_OK; -} /* baro_get_altitude */ - - /*------------------------------------------------------------------------------ Internal procedures ------------------------------------------------------------------------------*/ diff --git a/baro/baro.h b/baro/baro.h index 2a4847b..325c79d 100644 --- a/baro/baro.h +++ b/baro/baro.h @@ -263,25 +263,12 @@ BARO_STATUS baro_get_device_id uint8_t* baro_id ); - -/* gets pressure data from sensor */ -BARO_STATUS baro_get_pressure - ( - float* pressure_ptr - ); - /* gets temp data from sensor */ BARO_STATUS baro_get_temp ( float* temp_ptr ); -/* converts pressure and temp data into altitude --> do research on formula */ -BARO_STATUS baro_get_altitude - ( - void - ); - /* returns the baro_data_ready flag */ bool baro_get_baro_data_ready ( diff --git a/buzzer/buzzer.c b/buzzer/buzzer.c index 64b38ec..c0c41bb 100644 --- a/buzzer/buzzer.c +++ b/buzzer/buzzer.c @@ -153,124 +153,6 @@ for ( uint8_t i = 0; i < num_beeps; i++ ) } -/******************************************************************************* -* * -* PROCEDURE: * -* buzzer_num_beeps * -* * -* DESCRIPTION: * -* Beep the flight computer buzzer specified number of times * -* * -*******************************************************************************/ -BUZZ_STATUS buzzer_num_beeps - ( - uint8_t num_beeps /* Number of beeps */ - ) -{ -/* This function is implemented as a non-blocking function that uses the - sysClock to detemine when to take an action. The function is meant to be - used to loops with processing times less than the beep and intermittent - durations. The static variable num_calls is used to maintain memory of - how many times the function has been called. The static variables - init_beep_time and stop_beep_time are used to keep track of the time of - starting and stopping a beep between subsequenct function calls. The static - variable last_end_time is used to add a delay between subsequent sequences - of beeps so the beep count can be discerned */ -static uint8_t num_calls = 0; -static uint32_t init_beep_time = 0; -static uint32_t stop_beep_time = 0; -static uint32_t last_end_time = 0; - -/*------------------------------------------------------------------------------ - Local variables -------------------------------------------------------------------------------*/ -HAL_StatusTypeDef hal_status; /* Return codes from HAL API */ -uint8_t total_num_calls; /* Number of times the function must be - called to beep num_beeps times */ -uint8_t is_odd; /* 1 when num_calls is odd */ -uint32_t current_tick; /* Current Sys tick */ - - -/*------------------------------------------------------------------------------ - Initializations -------------------------------------------------------------------------------*/ -hal_status = HAL_OK; -total_num_calls = 2*num_beeps; -is_odd = num_calls%2; -current_tick = HAL_GetTick(); - - -/*------------------------------------------------------------------------------ - API Function Implementation -------------------------------------------------------------------------------*/ - -/* Check that enough time has elapsed since last beep sequence */ -if ( ( current_tick - last_end_time ) <= BUZZ_SEQUENCE_DELAY ) - { - return BUZZ_OK; - } - -/* Check for 0 beeps */ -if ( num_beeps == 0 ) - { - return BUZZ_OK; - } - -/* Remaining beeps */ -if ( is_odd ) - { - /* Stop Beep */ - if ( ( ( current_tick - init_beep_time ) >= BUZZ_BEEP_DURATION ) ) - { - hal_status = HAL_TIM_PWM_Stop( &( BUZZ_TIM ), BUZZ_TIM_CHANNEL ); - if ( hal_status != HAL_OK ) - { - return BUZZ_HAL_ERROR; - } - else - { - stop_beep_time = current_tick; - num_calls++; - /* Termination condition */ - if ( num_calls == total_num_calls ) - { - num_calls = 0; - last_end_time = current_tick; - } - return BUZZ_OK; - } - } - else - { - return BUZZ_OK; - } - - } -else - { - /* Start beep */ - if ( ( ( current_tick - stop_beep_time ) >= BUZZ_STOP_DURATION ) ) - { - hal_status = HAL_TIM_PWM_Start( &(BUZZ_TIM), BUZZ_TIM_CHANNEL ); - if ( hal_status != HAL_OK ) - { - return BUZZ_HAL_ERROR; - } - else - { - init_beep_time = current_tick; - num_calls++; - return BUZZ_OK; - } - } - else - { - return BUZZ_OK; - } - } -} /* buzzer_num_beeps */ - - /*------------------------------------------------------------------------------ Internal procedures ------------------------------------------------------------------------------*/ diff --git a/ignition/ignition.c b/ignition/ignition.c index 096e223..7578b01 100644 --- a/ignition/ignition.c +++ b/ignition/ignition.c @@ -132,53 +132,6 @@ return ign_status; } /* ign_cmd_execute */ -#if defined( ENGINE_CONTROLLER ) -/******************************************************************************* -* * -* PROCEDURE: * -* ign_ignite * -* * -* DESCRIPTION: * -* Asserts the ignition signal to ignite the engine ematch. Returns a * -* response code indicating if the ignition occured succesfully * -* * -*******************************************************************************/ -IGN_STATUS ign_ignite - ( - void - ) -{ -/*------------------------------------------------------------------------------ - API function implementation -------------------------------------------------------------------------------*/ - -/* Check for e-match/switch continuity */ -if ( !ign_ematch_cont() ) - { - /* No continuity across ematch and/or switch */ - return IGN_EMATCH_CONT_FAIL; - } - -/* Check that power supply is not USB */ - -/* Assert ignition signal for 10 ms */ -HAL_GPIO_WritePin(FIRE_GPIO_PORT, FIRE_PIN, GPIO_PIN_SET ); -HAL_Delay( IGN_BURN_DELAY ); -HAL_GPIO_WritePin(FIRE_GPIO_PORT, FIRE_PIN, GPIO_PIN_RESET); - -/* Check ematch continuity to check that ematch was lit */ -if ( !ign_ematch_cont() ) - { - return IGN_SUCCESS; - } -else /* Ignition unsuccessful */ - { - return IGN_FAIL; - } - -} /* ignite */ -#endif /* #if defined( ENGINE_CONTROLLER ) */ - /******************************************************************************* * * * PROCEDURE: * @@ -204,25 +157,6 @@ IGN_STATUS ign_status = 0; /* Status code to be returned */ Call API functions ------------------------------------------------------------------------------*/ -#if defined( ENGINE_CONTROLLER ) -/* Poll the ematch continuity pin */ -if ( ign_ematch_cont() ) - { - ign_status |= IGN_E_CONT_MASK; - } - -/* Poll the solid propellant continuity pin */ -if ( ign_solid_prop_cont() ) - { - ign_status |= IGN_SP_CONT_MASK; - } - -/* Poll the nozzle continuity pin */ -if ( ign_nozzle_cont() ) - { - ign_status |= IGN_NOZ_CONT_MASK; - } -#elif ( defined( FLIGHT_COMPUTER ) || defined( FLIGHT_COMPUTER_LITE ) ) /* Poll the switch continuity pin */ if ( ign_switch_cont() ) { @@ -240,7 +174,6 @@ if ( ign_drogue_cont() ) { ign_status |= IGN_DROGUE_CONT_MASK; } -#endif /* elif defined( FLIGHT_COMPUTER ) */ /* Return the status code */ return ign_status; @@ -248,105 +181,6 @@ return ign_status; } /* ign_get_cont_info */ -#if defined( ENGINE_CONTROLLER ) -/******************************************************************************* -* * -* PROCEDURE: * -* solid_prop_cont * -* * -* DESCRIPTION: * -* Returns TRUE if there is continuity across the solid propellant wire * -* screw terminals * -* * -*******************************************************************************/ -bool ign_solid_prop_cont - ( - void - ) -{ - -/* Check MCU GPIO State */ -uint8_t solid_prop_cont_pinstate = HAL_GPIO_ReadPin(SP_CONT_GPIO_PORT, SP_CONT_PIN); - -/* Return true if GPIO state is high*/ -if ( solid_prop_cont_pinstate == 0 ) - { - return true; - } -else - { - return false; - } - -} /* ign_solid_prop_cont */ - - -/******************************************************************************* -* * -* PROCEDURE: * -* ign_nozzle_cont * -* * -* DESCRIPTION: * -* Returns TRUE if there is continuity across the nozzle wire screw * -* terminals * -* * -*******************************************************************************/ -bool ign_nozzle_cont - ( - void - ) -{ - -/* Check MCU GPIO State */ -uint8_t nozzle_cont_pinstate = HAL_GPIO_ReadPin(NOZ_CONT_GPIO_PORT, NOZ_CONT_PIN); - -/* Return true if GPIO state is high*/ -if ( nozzle_cont_pinstate == 0 ) - { - return true; - } -else - { - return false; - } - -} /* ign_nozzle_cont */ - - -/******************************************************************************* -* * -* PROCEDURE: * -* ign_ematch_cont * -* * -* DESCRIPTION: * -* Returns TRUE if there is continuity across the ematch and switch screw * -* terminals * -* * -*******************************************************************************/ -bool ign_ematch_cont - ( - void - ) -{ -/* Check MCU GPIO State */ -uint8_t ematch_cont_pinstate = HAL_GPIO_ReadPin(E_CONT_GPIO_PORT, E_CONT_PIN); - -/* Return true if GPIO state is low */ -if ( ematch_cont_pinstate == 0 ) - { - return false; - } -else - { - return true; - } - -} /* ign_ematch_cont */ - -#endif /* #if defined( ENGINE_CONTROLLER ) */ - - -#if ( defined( FLIGHT_COMPUTER ) || defined( FLIGHT_COMPUTER_LITE ) ) /******************************************************************************* * * * PROCEDURE: * @@ -510,10 +344,8 @@ else } } /* drogue_cont */ -#endif /* #if defined( FLIGHT_COMPUTER ) */ -#if ( defined( FLIGHT_COMPUTER ) || defined( FLIGHT_COMPUTER_LITE ) ) /******************************************************************************* * * * PROCEDURE: * @@ -566,7 +398,6 @@ if( !ign_switch_enabled ) return ign_switch_cont(); } /* switch_armed */ -#endif /* #if defined( FLIGHT_COMPUTER ) */ /******************************************************************************* diff --git a/ignition/ignition.h b/ignition/ignition.h index e44aa7b..752b8f9 100644 --- a/ignition/ignition.h +++ b/ignition/ignition.h @@ -123,36 +123,7 @@ IGN_STATUS ign_get_cont_info void ); -#if defined( ENGINE_CONTROLLER ) -/* Asserts the ignition signal to ignite the engine ematch. Returns a response -code indicating if the ignition occured succesfully */ -IGN_STATUS ign_ignite - ( - void - ); - -/* Check for continuity across solid propellant wire screw terminals */ -bool ign_solid_prop_cont - ( - void - ); - -/* Check for continuity across nozzle wire screw terminals */ -bool ign_nozzle_cont - ( - void - ); -/* Check for continuity across ematch and switch screw terminals */ -bool ign_ematch_cont - ( - void - ); - -#endif /* #if defined( ENGINE_CONTROLLER ) */ - - -#if ( defined( FLIGHT_COMPUTER ) || defined( FLIGHT_COMPUTER_LITE ) ) /* Asserts the ignition signal to ignite the main parachute deployment ematch. Returns a response code indicating if the ignition occured succesfully */ IGN_STATUS ign_deploy_main @@ -195,8 +166,6 @@ bool ign_switch_armed void ); -#endif /* #if defined( FLIGHT_COMPUTER )*/ - #ifdef __cplusplus } #endif diff --git a/imu/imu.c b/imu/imu.c index 64a0c61..5d1a77a 100644 --- a/imu/imu.c +++ b/imu/imu.c @@ -300,273 +300,6 @@ return IMU_OK; #endif /* #if defined( A0002_REV2 ) */ -/******************************************************************************* -* * -* PROCEDURE: * -* imu_get_accel_xyz * -* * -* DESCRIPTION: * -* Return the pointer to structure that updates the * -* x,y,z acceleration values from the IMU * -* * -*******************************************************************************/ -IMU_STATUS imu_get_accel_xyz - ( - IMU_RAW *pIMU /* size: 12 bytes */ - ) -{ -/*------------------------------------------------------------------------------ - Local variables -------------------------------------------------------------------------------*/ -uint8_t regAccel[6]; /* Bytes from accelerometer registers */ -uint16_t accel_x_raw ; /* Raw sensor readouts */ -uint16_t accel_y_raw ; -uint16_t accel_z_raw ; -IMU_STATUS imu_status; /* IMU status codes */ - - -/*------------------------------------------------------------------------------ - API function implementation -------------------------------------------------------------------------------*/ - -/* Read ACCEL_X, ACCEL_Y, ACCEL_Z high byte and low byte registers */ -#if defined( A0002_REV1 ) - imu_status = read_imu_regs( IMU_REG_ACCEL_XOUT_H, - ®Accel[0] , - sizeof( regAccel ) ); -#elif defined( A0002_REV2 ) - imu_status = read_imu_regs( IMU_REG_DATA_8, - ®Accel[0] , - sizeof( regAccel ) ); -#endif - -/* Check for HAL IMU error */ -if ( imu_status != IMU_OK ) - { - return imu_status; - } - -/* Combine high byte and low byte to 16 bit data */ -#if defined( A0002_REV1 ) - accel_x_raw = ( (uint16_t) regAccel[0] ) << 8 | regAccel[1]; - accel_y_raw = ( (uint16_t) regAccel[2] ) << 8 | regAccel[3]; - accel_z_raw = ( (uint16_t) regAccel[4] ) << 8 | regAccel[5]; -#elif defined( A0002_REV2 ) - accel_x_raw = ( (uint16_t) regAccel[1] ) << 8 | regAccel[0]; - accel_y_raw = ( (uint16_t) regAccel[3] ) << 8 | regAccel[2]; - accel_z_raw = ( (uint16_t) regAccel[5] ) << 8 | regAccel[4]; -#endif - -/* Export data to IMU sstruct */ -pIMU->accel_x = accel_x_raw; -pIMU->accel_y = accel_y_raw; -pIMU->accel_z = accel_z_raw; - -return IMU_OK; -} /* imu_get_accel_xyz */ - - -/******************************************************************************* -* * -* PROCEDURE: * -* imu_get_gryo_xyz * -* * -* DESCRIPTION: * -* Return the pointer to structure that updates the x,y,z gyro values * -* from the IMU * -* * -*******************************************************************************/ -IMU_STATUS imu_get_gyro_xyz - ( - IMU_RAW *pIMU - ) -{ -/*------------------------------------------------------------------------------ - Local variables -------------------------------------------------------------------------------*/ -uint8_t regGyro[6]; /* Bytes from gyro registers */ -int16_t gyro_x_raw; /* Raw gyro sensor readouts */ -int16_t gyro_y_raw; -int16_t gyro_z_raw; -IMU_STATUS imu_status; /* IMU status return codes */ - - -/*------------------------------------------------------------------------------ - API function implementation -------------------------------------------------------------------------------*/ - -/* Read GYRO_X, GYRO_Y, GYRO_Z high byte and low byte registers */ -#if defined( A0002_REV1 ) - imu_status = read_imu_regs( IMU_REG_GYRO_XOUT_H, - ®Gyro[0] , - sizeof( regGyro ) ); -#elif defined( A0002_REV2 ) - imu_status = read_imu_regs( IMU_REG_DATA_14, - ®Gyro[0] , - sizeof( regGyro ) ); -#endif - -/* Check for HAL IMU error */ -if ( imu_status != IMU_OK ) - { - return imu_status; - } - -/* Combine high byte and low byte to 16 bit data */ -#if defined( A0002_REV1 ) - gyro_x_raw = ( (uint16_t) regGyro[0] ) << 8 | regGyro[1]; - gyro_y_raw = ( (uint16_t) regGyro[0] ) << 8 | regGyro[1]; - gyro_z_raw = ( (uint16_t) regGyro[0] ) << 8 | regGyro[1]; -#elif defined( A0002_REV2 ) - gyro_x_raw = (int16_t) ( (uint16_t) regGyro[1] << 8 | regGyro[0] ); - gyro_y_raw = (int16_t) ( (uint16_t) regGyro[3] << 8 | regGyro[2] ); - gyro_z_raw = (int16_t) ( (uint16_t) regGyro[5] << 8 | regGyro[4] ); -#endif - -/* Export Sensor Readouts */ -pIMU->gyro_x = gyro_x_raw; -pIMU->gyro_y = gyro_y_raw; -pIMU->gyro_z = gyro_z_raw; - -return IMU_OK; -} /* imu_get_gyro_xyz */ - - -#ifdef A0002_REV2 -/******************************************************************************* -* * -* PROCEDURE: * -* imu_get_accel_and_gyro * -* * -* DESCRIPTION: * -* Return a pointer to the struct that houses accel and gyro values * -* from the IMU * -* * -*******************************************************************************/ -IMU_STATUS imu_get_accel_and_gyro - ( - IMU_RAW *pIMU - ) -{ -/*------------------------------------------------------------------------------ - Local variables -------------------------------------------------------------------------------*/ -uint8_t regRaw[12]; /* Bytes from raw registers */ -int16_t accel_x_raw; /* Raw accel sensor readouts */ -int16_t accel_y_raw; -int16_t accel_z_raw; -int16_t gyro_x_raw; /* Raw gyro sensor readouts */ -int16_t gyro_y_raw; -int16_t gyro_z_raw; -IMU_STATUS imu_status; /* IMU status return codes */ - - -/*------------------------------------------------------------------------------ - API function implementation -------------------------------------------------------------------------------*/ - -/* Read ACCEL and GYRO high byte and low byte registers */ -imu_status = read_imu_regs( IMU_REG_DATA_8, - ®Raw[0] , - sizeof( regRaw ) ); - - -/* Check for HAL IMU error */ -if ( imu_status != IMU_OK ) - { - return imu_status; - } - -/* Combine high byte and low byte to 16 bit data */ -accel_x_raw = (int16_t) ( (uint16_t) regRaw[1] << 8 | regRaw[0] ); -accel_y_raw = (int16_t) ( (uint16_t) regRaw[3] << 8 | regRaw[2] ); -accel_z_raw = (int16_t) ( (uint16_t) regRaw[5] << 8 | regRaw[4] ); -gyro_x_raw = (int16_t) ( (uint16_t) regRaw[7] << 8 | regRaw[6] ); -gyro_y_raw = (int16_t) ( (uint16_t) regRaw[9] << 8 | regRaw[8] ); -gyro_z_raw = (int16_t) ( (uint16_t) regRaw[11] << 8 | regRaw[10] ); - -/* Export Sensor Readouts */ -pIMU->accel_x = accel_x_raw; -pIMU->accel_y = accel_y_raw; -pIMU->accel_z = accel_z_raw; -pIMU->gyro_x = gyro_x_raw; -pIMU->gyro_y = gyro_y_raw; -pIMU->gyro_z = gyro_z_raw; - -return IMU_OK; -} /* imu_get_gyro_xyz */ -#endif - - -/******************************************************************************* -* * -* PROCEDURE: * -* imu_get_mag_xyz * -* * -* DESCRIPTION: * -* Return the pointer to structure that updates the x,y,z magnetometer * -* values from the IMU * -* * -*******************************************************************************/ -IMU_STATUS imu_get_mag_xyz - ( - IMU_RAW *pIMU - ) -{ -/*------------------------------------------------------------------------------ - Local variables -------------------------------------------------------------------------------*/ -uint8_t regMag[6]; /* Magnetometer register bytes */ -uint16_t mag_x_raw; /* Raw magnetometer sensor readouts */ -uint16_t mag_y_raw; -uint16_t mag_z_raw; -IMU_STATUS imu_status; /* IMU status return codes */ - - -/*------------------------------------------------------------------------------ - API function implementation -------------------------------------------------------------------------------*/ - -/* Read MAG_X, MAG_Y, MAG_Z high byte and low byte registers */ -#if defined( A0002_REV1 ) - imu_status = read_mag_regs( IMU_REG_MAG_XOUT_H, - ®Mag[0] , - sizeof( regMag ) ); -#elif defined( A0002_REV2 ) - imu_status = read_mag_regs( MAG_REG_DATAX_L, - ®Mag[0] , - sizeof( regMag ) ); -#endif - -/* Check for HAL IMU error */ -if ( imu_status == IMU_TIMEOUT ) - { - return IMU_TIMEOUT; - } - -/* Combine high byte and low byte to 16 bit data */ -#if defined( A0002_REV1 ) - mag_x_raw = ( (uint16_t) regMag[1] ) << 8 | regMag[0]; - mag_y_raw = ( (uint16_t) regMag[3] ) << 8 | regMag[2]; - mag_z_raw = ( (uint16_t) regMag[5] ) << 8 | regMag[4]; -#elif defined( A0002_REV2 ) - mag_x_raw = ( (uint16_t) regMag[1] << MAG_XY_MSB_BITSHIFT ) | - ( ( (uint16_t) regMag[0] && MAG_XY_LSB_BITMASK ) >> MAG_XY_LSB_BITSHIFT ); - mag_y_raw = ( (uint16_t) regMag[3] << MAG_XY_MSB_BITSHIFT ) | - ( ( (uint16_t) regMag[2] && MAG_XY_LSB_BITMASK ) >> MAG_XY_LSB_BITSHIFT ); - mag_z_raw = ( (uint16_t) regMag[5] << MAG_Z_MSB_BITSHIFT ) | - ( ( (uint16_t) regMag[4] && MAG_Z_LSB_BITMASK ) >> MAG_Z_LSB_BITSHIFT ); -#endif - -/* Export sensor data */ -pIMU->mag_x = mag_x_raw; -pIMU->mag_y = mag_y_raw; -pIMU->mag_z = mag_z_raw; - -return IMU_OK; -} /* imu_get_mag_xyz */ - - /******************************************************************************* * * * PROCEDURE: * diff --git a/imu/imu.h b/imu/imu.h index 48a5f92..545b8a1 100644 --- a/imu/imu.h +++ b/imu/imu.h @@ -445,34 +445,6 @@ IMU_STATUS imu_init IMU_CONFIG* imu_config_ptr /* IMU Configuration Settings */ ); -/* Return the pointer to structure that updates the x,y,z acceleration values - from the IMU */ -IMU_STATUS imu_get_accel_xyz - ( - IMU_RAW *pIMU - ); - -/* Return the pointer to structure that updates the x,y,z gyro values from the IMU */ -IMU_STATUS imu_get_gyro_xyz - ( - IMU_RAW *pIMU - ); - -#ifdef A0002_REV2 -/* Return a pointer to the struct that houses accel and gyro values from the IMU */ -IMU_STATUS imu_get_accel_and_gyro - ( - IMU_RAW *pIMU - ); -#endif - -/* Return the pointer to structure that updates the x,y,z magnetometer values from - the IMU */ -IMU_STATUS imu_get_mag_xyz - ( - IMU_RAW *pIMU - ); - /* return the device ID of the IMU to verify that the IMU registers are accessible */ IMU_STATUS imu_get_device_id ( diff --git a/led/led.c b/led/led.c index add5215..6650817 100644 --- a/led/led.c +++ b/led/led.c @@ -50,29 +50,6 @@ ------------------------------------------------------------------------------*/ -/******************************************************************************* -* * -* PROCEDURE: * -* led_error_assert * -* * -* DESCRIPTION: * -* Sets the RGB LED to red to indicate a software exception * -* * -*******************************************************************************/ -void led_error_assert - ( - void - ) -{ -/* Reset RGB LED */ -led_reset(); - -/* Set the RGB LED to red */ -HAL_GPIO_WritePin(STATUS_GPIO_PORT, STATUS_R_PIN, GPIO_PIN_RESET); - -} /* led_error_assert */ - - /******************************************************************************* * * * PROCEDURE: * @@ -100,31 +77,6 @@ HAL_GPIO_WritePin( } /* led_reset */ -/******************************************************************************* -* * -* PROCEDURE: * -* led_error_flash * -* * -* DESCRIPTION: * -* Flashes the RGB led red to indicate the code hit a block of code not * -* intended to be hit under normal conditions * -* * -*******************************************************************************/ -void led_error_flash - ( - void - ) -{ - -/* Flash led red */ -led_reset(); -HAL_GPIO_WritePin(STATUS_GPIO_PORT, STATUS_R_PIN, GPIO_PIN_RESET); -HAL_Delay(100); -HAL_GPIO_WritePin(STATUS_GPIO_PORT, STATUS_R_PIN, GPIO_PIN_SET); - -} /* led_error_flash */ - - /******************************************************************************* * * * PROCEDURE: * diff --git a/led/led.h b/led/led.h index 6e87ef9..fde64e8 100644 --- a/led/led.h +++ b/led/led.h @@ -54,25 +54,12 @@ typedef enum LED_COLOR_CODES Function Prototypes ------------------------------------------------------------------------------*/ -/* Display Red to indicate software exception */ -void led_error_assert - ( - void - ); - /* Reset the led */ void led_reset ( void ); -/* Flash Red to indicate that the code hit a block of code not meant to be run - without blocking the program from running */ -void led_error_flash - ( - void - ); - /* Sets the LED to a color from the LED_COLOR_CODES enum */ void led_set_color (