Skip to content

Commit

Permalink
Rename remaining unmodified paths and adjust file references in sourc…
Browse files Browse the repository at this point in the history
…es and headers, update CMake and uVision projects to reflect changes
  • Loading branch information
s3785111 committed Jan 21, 2025
1 parent 7062c7c commit f8734ce
Show file tree
Hide file tree
Showing 34 changed files with 537 additions and 428 deletions.
70 changes: 35 additions & 35 deletions Australis-Avionics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ set(RAM2_SIZE 0x00010000)

set(HEADERS
${CMAKE_SOURCE_DIR}/Core/Inc
${CMAKE_SOURCE_DIR}/Core/Inc/CAN
${CMAKE_SOURCE_DIR}/Core/Inc/RTOS
${CMAKE_SOURCE_DIR}/Core/Inc/RTOS/tasks
${CMAKE_SOURCE_DIR}/Core/Inc/RTOS/tasks/comms
${CMAKE_SOURCE_DIR}/Core/Inc/RTOS/tasks/data
${CMAKE_SOURCE_DIR}/Core/Inc/SPI
${CMAKE_SOURCE_DIR}/Core/Inc/SPI/flash
${CMAKE_SOURCE_DIR}/Core/Inc/SPI/lora
${CMAKE_SOURCE_DIR}/Core/Inc/SPI/sensors
${CMAKE_SOURCE_DIR}/Core/Inc/SPI/sensors/accel
${CMAKE_SOURCE_DIR}/Core/Inc/SPI/sensors/baro
${CMAKE_SOURCE_DIR}/Core/Inc/SPI/sensors/gyro
${CMAKE_SOURCE_DIR}/Core/Inc/UART
${CMAKE_SOURCE_DIR}/Core/Inc/UART/GPS
${CMAKE_SOURCE_DIR}/Core/Inc/UART/USB
${CMAKE_SOURCE_DIR}/Core/Inc/can
${CMAKE_SOURCE_DIR}/Core/Inc/rtos
${CMAKE_SOURCE_DIR}/Core/Inc/rtos/tasks
${CMAKE_SOURCE_DIR}/Core/Inc/rtos/tasks/comms
${CMAKE_SOURCE_DIR}/Core/Inc/rtos/tasks/data
${CMAKE_SOURCE_DIR}/Core/Inc/spi
${CMAKE_SOURCE_DIR}/Core/Inc/spi/flash
${CMAKE_SOURCE_DIR}/Core/Inc/spi/lora
${CMAKE_SOURCE_DIR}/Core/Inc/spi/sensors
${CMAKE_SOURCE_DIR}/Core/Inc/spi/sensors/accel
${CMAKE_SOURCE_DIR}/Core/Inc/spi/sensors/baro
${CMAKE_SOURCE_DIR}/Core/Inc/spi/sensors/gyro
${CMAKE_SOURCE_DIR}/Core/Inc/uart
${CMAKE_SOURCE_DIR}/Core/Inc/uart/gps
${CMAKE_SOURCE_DIR}/Core/Inc/uart/usb
${CMAKE_SOURCE_DIR}/Lib/inc
${CMAKE_SOURCE_DIR}/Lib/inc/CORE
${CMAKE_SOURCE_DIR}/Lib/inc/CORE/Include
Expand Down Expand Up @@ -79,32 +79,32 @@ set(SOURCES
${CMAKE_SOURCE_DIR}/Core/Src/shell/help.c

# -- RTOS -----------------------------------------------
${CMAKE_SOURCE_DIR}/Core/Src/RTOS/freertos.c
${CMAKE_SOURCE_DIR}/Core/Src/RTOS/tasks/stateUpdate.c
${CMAKE_SOURCE_DIR}/Core/Src/RTOS/tasks/comms/loraComm.c
${CMAKE_SOURCE_DIR}/Core/Src/RTOS/tasks/comms/usbComm.c
${CMAKE_SOURCE_DIR}/Core/Src/RTOS/tasks/data/flashWrite.c
${CMAKE_SOURCE_DIR}/Core/Src/RTOS/tasks/data/gpsAcquisition.c
${CMAKE_SOURCE_DIR}/Core/Src/RTOS/tasks/data/hDataAcquisition.c
${CMAKE_SOURCE_DIR}/Core/Src/RTOS/tasks/data/lDataAcquisition.c
${CMAKE_SOURCE_DIR}/Core/Src/RTOS/tasks/comms/payloadComm.c
${CMAKE_SOURCE_DIR}/Core/Src/rtos/freertos.c
${CMAKE_SOURCE_DIR}/Core/Src/rtos/tasks/stateupdate.c
${CMAKE_SOURCE_DIR}/Core/Src/rtos/tasks/comms/loracomm.c
${CMAKE_SOURCE_DIR}/Core/Src/rtos/tasks/comms/usbcomm.c
${CMAKE_SOURCE_DIR}/Core/Src/rtos/tasks/data/flashwrite.c
${CMAKE_SOURCE_DIR}/Core/Src/rtos/tasks/data/gpsacquisition.c
${CMAKE_SOURCE_DIR}/Core/Src/rtos/tasks/data/hdataacquisition.c
${CMAKE_SOURCE_DIR}/Core/Src/rtos/tasks/data/ldataacquisition.c
${CMAKE_SOURCE_DIR}/Core/Src/rtos/tasks/comms/payloadcomm.c

# -- CAN ------------------------------------------------
${CMAKE_SOURCE_DIR}/Core/Src/CAN/can.c
${CMAKE_SOURCE_DIR}/Core/Src/can/can.c

# -- SPI ------------------------------------------------
${CMAKE_SOURCE_DIR}/Core/Src/SPI/spi.c
${CMAKE_SOURCE_DIR}/Core/Src/SPI/flash/flash.c
${CMAKE_SOURCE_DIR}/Core/Src/SPI/lora/lora.c
${CMAKE_SOURCE_DIR}/Core/Src/SPI/sensors/sensors.c
${CMAKE_SOURCE_DIR}/Core/Src/SPI/sensors/accel/KX134_1211.c
${CMAKE_SOURCE_DIR}/Core/Src/SPI/sensors/gyro/A3G4250D.c
${CMAKE_SOURCE_DIR}/Core/Src/SPI/sensors/baro/BMP581.c
${CMAKE_SOURCE_DIR}/Core/Src/spi/spi.c
${CMAKE_SOURCE_DIR}/Core/Src/spi/flash/flash.c
${CMAKE_SOURCE_DIR}/Core/Src/spi/lora/lora.c
${CMAKE_SOURCE_DIR}/Core/Src/spi/sensors/sensors.c
${CMAKE_SOURCE_DIR}/Core/Src/spi/sensors/accel/kx134_1211.c
${CMAKE_SOURCE_DIR}/Core/Src/spi/sensors/gyro/a3g4250d.c
${CMAKE_SOURCE_DIR}/Core/Src/spi/sensors/baro/bmp581.c

# -- UART -----------------------------------------------
${CMAKE_SOURCE_DIR}/Core/Src/UART/uart.c
${CMAKE_SOURCE_DIR}/Core/Src/UART/GPS/gps.c
${CMAKE_SOURCE_DIR}/Core/Src/UART/USB/shell.c
${CMAKE_SOURCE_DIR}/Core/Src/uart/uart.c
${CMAKE_SOURCE_DIR}/Core/Src/uart/gps/gps.c
${CMAKE_SOURCE_DIR}/Core/Src/uart/usb/shell.c

# -- FreeRTOS -------------------------------------------
${CMAKE_SOURCE_DIR}/Middlewares/Third_Party/FreeRTOS/Source/croutine.c
Expand Down
32 changes: 17 additions & 15 deletions Australis-Avionics/Core/Inc/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@
#include "message_buffer.h"
#include "semphr.h"

#include "flashWrite.h"
#include "gpsAcquisition.h"
#include "hDataAcquisition.h"
#include "lDataAcquisition.h"
#include "flashwrite.h"
#include "gpsacquisition.h"
#include "hdataacquisition.h"
#include "ldataacquisition.h"

#include "loraComm.h"
#include "payloadComm.h"
#include "usbComm.h"
#include "loracomm.h"
#include "payloadcomm.h"
#include "usbcomm.h"

#include "stateUpdate.h"
#include "stateupdate.h"

#include "A3G4250D.h"
#include "BMP581.h"
#include "KX134_1211.h"
#include "a3g4250d.h"
#include "bmp581.h"
#include "can.h"
#include "dataframe.h"
#include "devices.h"
#include "drivers.h"
#include "flash.h"
#include "gps.h"
#include "kx134_1211.h"
#include "lora.h"
#include "sensors.h"
#include "shell.h"
Expand Down Expand Up @@ -97,13 +97,15 @@ void Error_Handler(void);
// USB UART
#define USB_INTERFACE USART6
#define USB_PORT GPIOC
#define USB_PINS (UART_Pins){.TX = 6, .RX = 7}
#define USB_BAUD 921600
#define USB_PINS \
(UART_Pins) { .TX = 6, .RX = 7 }
#define USB_BAUD 921600

// GPS UART
#define GPS_INTERFACE USART3
#define GPS_PORT GPIOD
#define GPS_PINS (UART_Pins){.TX = 8, .RX = 9}
#define GPS_BAUD 9600
#define GPS_PINS \
(UART_Pins) { .TX = 8, .RX = 9 }
#define GPS_BAUD 9600

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#include "message_buffer.h"
#include "stm32f439xx.h"

#include "a3g4250d.h"
#include "bmp581.h"
#include "devices.h"
#include "BMP581.h"
#include "A3G4250D.h"
#include "KX134_1211.h"
#include "kx134_1211.h"
#include "lora.h"
#include "stateUpdate.h"
#include "stateupdate.h"

void vLoRaTransmit(void *pvParameters);
void vLoRaSample(void *pvParameters);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
#include "message_buffer.h"
#include "stdio.h"

#include "params.h"
#include "stateUpdate.h"
#include "dataframe.h"
#include "can.h"
#include "dataframe.h"
#include "lora.h"
#include "params.h"
#include "stateupdate.h"

#define PAYLOAD_ACCEL_TOTAL 6

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "devices.h"
#include "flash.h"
#include "membuff.h"
#include "stateUpdate.h"
#include "stateupdate.h"

typedef struct {
enum State *currentState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
#include "message_buffer.h"
#include "stdio.h"

#include "stateUpdate.h"
#include "dataframe.h"
#include "devices.h"
#include "gps.h"
#include "lora.h"
#include "stateupdate.h"

#define GPS_RX_SIZE 128
#define GPS_RX_SIZE 128

void vGpsTransmit(void *);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

#include "stdio.h"

#include "A3G4250D.h"
#include "KX134_1211.h"
#include "a3g4250d.h"
#include "dataframe.h"
#include "devices.h"
#include "kx134_1211.h"
#include "membuff.h"
#include "sensors.h"
#include "stateUpdate.h"
#include "stateupdate.h"

#ifdef DUMMY
#include "accelX.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

#include "stdio.h"

#include "BMP581.h"
#include "KX134_1211.h"
#include "bmp581.h"
#include "dataframe.h"
#include "kalmanfilter.h"
#include "kx134_1211.h"
#include "membuff.h"
#include "sensors.h"
#include "stateUpdate.h"
#include "stateupdate.h"

#ifdef DUMMY
#include "press.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
#define _STATE_H

#include "FreeRTOS.h"
#include "task.h"
#include "event_groups.h"
#include "groups.h"
#include "handles.h"
#include "message_buffer.h"
#include "semphr.h"
#include "task.h"

#include "KX134_1211.h"
#include "can.h"
#include "dataframe.h"
#include "devices.h"
#include "kx134_1211.h"
#include "params.h"
#include "quaternion.h"
#include "sensors.h"
#include "slidingwindow.h"
#include "devices.h"

void vStateUpdate(void *pvParameters);

Expand Down
2 changes: 1 addition & 1 deletion Australis-Avionics/Core/Inc/shell/baro.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "stdio.h"

#include "BMP581.h"
#include "bmp581.h"
#include "devices.h"
#include "shell.h"
#include "uart.h"
Expand Down
4 changes: 2 additions & 2 deletions Australis-Avionics/Core/Inc/shell/launch.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#define _LAUNCH_H

#include "devices.h"
#include "shell.h"
#include "stateUpdate.h"
#include "params.h"
#include "shell.h"
#include "stateupdate.h"

#endif
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* LORA HANDLING *
* ===================================================================== */

#include "loraComm.h"
#include "loracomm.h"

extern EventGroupHandle_t xMsgReadyGroup;
extern MessageBufferHandle_t xLoRaTxBuff;
Expand All @@ -19,7 +19,7 @@ void vLoRaTransmit(void *argument) {
const TickType_t blockTime = portMAX_DELAY;
uint8_t rxData[LORA_MSG_LENGTH];

LoRa *lora = DeviceHandle_getHandle("LoRa").device;
LoRa *lora = DeviceHandle_getHandle("LoRa").device;

for (;;) {
// Wait for SX1272 to be ready for transmission
Expand Down Expand Up @@ -51,22 +51,22 @@ void vLoRaTransmit(void *argument) {
*/
void vLoRaSample(void *argument) {
const TickType_t xFrequency = pdMS_TO_TICKS(250);
const TickType_t blockTime = pdMS_TO_TICKS(125);
A3G4250D *gyro = DeviceHandle_getHandle("Gyro").device;
KX134_1211 *lAccel = DeviceHandle_getHandle("LAccel").device;
KX134_1211 *hAccel = DeviceHandle_getHandle("HAccel").device;
enum State *flightState = StateHandle_getHandle("FlightState").state;
float *altitude = StateHandle_getHandle("Altitude").state;
float *velocity = StateHandle_getHandle("Velocity").state;
const TickType_t blockTime = pdMS_TO_TICKS(125);

A3G4250D *gyro = DeviceHandle_getHandle("Gyro").device;
KX134_1211 *lAccel = DeviceHandle_getHandle("LAccel").device;
KX134_1211 *hAccel = DeviceHandle_getHandle("HAccel").device;

enum State *flightState = StateHandle_getHandle("FlightState").state;
float *altitude = StateHandle_getHandle("Altitude").state;
float *velocity = StateHandle_getHandle("Velocity").state;

for (;;) {
// Block until 250ms interval
TickType_t xLastWakeTime = xTaskGetTickCount();
TickType_t xLastWakeTime = xTaskGetTickCount();
vTaskDelayUntil(&xLastWakeTime, xFrequency);
uint8_t systemStatus = xEventGroupGetBits(xSystemStatusGroup);

uint8_t systemStatus = xEventGroupGetBits(xSystemStatusGroup);

// Create AVData packet with current data
LoRa_Packet avData = LoRa_AVData(
Expand Down
Loading

0 comments on commit f8734ce

Please sign in to comment.