Skip to content

Commit

Permalink
make rx_aux_on a macro
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed Nov 10, 2023
1 parent deb0c62 commit 373125d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/flight/imu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <stdint.h>
#include <stdlib.h>

#include "core/profile.h"
#include "core/project.h"
#include "driver/time.h"
#include "flight/control.h"
Expand Down
3 changes: 2 additions & 1 deletion src/io/buzzer.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

#include "io/buzzer.h"

#include "core/profile.h"
#include "core/project.h"
#include "driver/gpio.h"
#include "driver/time.h"
Expand Down Expand Up @@ -39,7 +40,7 @@ void buzzer_init() {
gpio_init.mode = GPIO_OUTPUT;
gpio_init.output = GPIO_PUSHPULL;
gpio_init.pull = GPIO_NO_PULL;
gpio_pin_init( target.buzzer.pin, gpio_init);
gpio_pin_init(target.buzzer.pin, gpio_init);

buzzer_off();
}
Expand Down
4 changes: 0 additions & 4 deletions src/rx/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ static uint32_t frames_received = 0;
static filter_lp_pt2 rx_filter;
static filter_state_t rx_filter_state[4];

uint8_t rx_aux_on(aux_function_t function) {
return state.aux[profile.receiver.aux[function]];
}

void rx_lqi_lost_packet() {
frames_missed++;

Expand Down
2 changes: 1 addition & 1 deletion src/rx/rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ typedef enum {
AUX_FUNCTION_MAX
} __attribute__((__packed__)) aux_function_t;

uint8_t rx_aux_on(aux_function_t function);
#define rx_aux_on(function) (state.aux[profile.receiver.aux[(function)]])

void rx_init();
void rx_update();
Expand Down

0 comments on commit 373125d

Please sign in to comment.