Skip to content

Commit

Permalink
Fix shutdown pin behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
MrARM committed Aug 27, 2022
1 parent 5476576 commit fa1fcd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

// Set the tracker amateur radio call sign here
#define CALLSIGN "N0UUU"
#define CALLSIGN "N0CALL"

// Disabling LEDs will save power
// Red LED: Lit during initialization and transmit.
Expand All @@ -22,7 +22,7 @@
#define LEDS_DISABLE_ALTITUDE_METERS 1000

// Allow powering off the sonde by pressing the button for over a second (when the sonde is not transmitting)
#define ALLOW_POWER_OFF true
#define ALLOW_POWER_OFF false

// Enable use of an externally connected I²C BMP280/BME280 atmospheric sensor
// NOTE: Only BME280 sensors will report humidity. For BMP280 humidity readings will be zero.
Expand Down Expand Up @@ -56,7 +56,7 @@

// Si4032 transmit power: 0..7
// 0 = -1dBm, 1 = 2dBm, 2 = 5dBm, 3 = 8dBm, 4 = 11dBm, 5 = 14dBm, 6 = 17dBm, 7 = 20dBm
#define RADIO_SI4032_TX_POWER 7
#define RADIO_SI4032_TX_POWER 5

// Which modes to transmit using the built-in Si4032 transmitter chip
#define RADIO_SI4032_TX_CW true
Expand Down
3 changes: 2 additions & 1 deletion src/hal/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ static void gpio_init()
gpio_init.GPIO_Mode = GPIO_Mode_Out_PP;
gpio_init.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOC, &gpio_init);
GPIO_SetBits(GPIOC, GPIO_Pin_0);

// Battery voltage (analog)
// gpio_init.GPIO_Pin = GPIO_Pin_5;
Expand Down Expand Up @@ -172,7 +173,7 @@ uint16_t system_get_button_adc_value()

void system_shutdown()
{
GPIO_SetBits(GPIOC, GPIO_Pin_0);
GPIO_ResetBits(GPIOC, GPIO_Pin_0);
}

void system_handle_button()
Expand Down

0 comments on commit fa1fcd8

Please sign in to comment.