Skip to content

Commit

Permalink
Fixed issues with code and build reverted to old
Browse files Browse the repository at this point in the history
  • Loading branch information
2BlackCats committed Dec 2, 2024
1 parent 27d909d commit 7f699ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 36 deletions.
14 changes: 2 additions & 12 deletions firmware/Core/Inc/gps/gps_pps_interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,14 @@

#include "stm32l4xx_hal.h"

uint32_t pps_counter;
extern uint32_t pps_counter;

uint8_t gps_pps_enabled;
extern uint8_t gps_pps_enabled;

void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);

void GPIO_EXTI_Init(void);

void Disable_GPIO_EXTI(void);

uint8_t get_gps_pps_enabled(void);

void set_gps_pps_enabled(void);

void set_gps_pps_disabled(void);

uint32_t get_pps_counter(void);

void reset_pps_counter(void);

#endif // __INCLUDE_GUARD__GPS_PPS_INTERRUPT_H
20 changes: 0 additions & 20 deletions firmware/Core/Src/gps/gps_pps_interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,3 @@ void Disable_GPIO_EXTI(void) {
HAL_NVIC_DisableIRQ(EXTI9_5_IRQn);
gps_pps_enabled = 0;
}

uint8_t get_gps_pps_enabled(void) {
return gps_pps_enabled;
}

void set_gps_pps_enabled(void) {
gps_pps_enabled = 1;
}

void set_gps_pps_disabled(void) {
gps_pps_enabled = 0;
}

uint32_t get_pps_counter(void) {
return pps_counter;
}

void reset_pps_counter(void) {
pps_counter = 0;
}
8 changes: 4 additions & 4 deletions firmware/Core/Src/telecommands/gps_telecommand_defs.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
uint8_t TCMDEXEC_gps_set_enabled_pps_tracking(const char *args_str, TCMD_TelecommandChannel_enum_t tcmd_channel,
char *response_output_buf, uint16_t response_output_buf_len) {
// Check if EXTI is active
if (get_gps_pps_enabled()) {
if (gps_pps_enabled) {
// Disable EXTI tracking
Disable_GPIO_EXTI();
set_gps_pps_disabled();
gps_pps_enabled = 0;
snprintf(
response_output_buf, response_output_buf_len,
"PPS tracking disabled");
return 0;
}
// Check if EXTI is inactive
else if (!get_gps_pps_enabled()) {
else if (!gps_pps_enabled) {
// Enable EXTI tracking
GPIO_EXTI_Init();
set_gps_pps_enabled();
gps_pps_enabled = 1;
snprintf(
response_output_buf, response_output_buf_len,
"PPS tracking enabled");
Expand Down

0 comments on commit 7f699ea

Please sign in to comment.