Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed dead variables and make variables static #82

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Mcu/f031/Src/stm32f0xx_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ extern void PeriodElapsedCallback();
extern void tenKhzRoutine();
extern char servoPwm;

// extern uint32_t gcr[];
// extern uint8_t gcr_size;
char input_ready = 0;
int update_interupt = 0;
uint8_t update_count = 0;
Expand Down
33 changes: 16 additions & 17 deletions Src/dshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,32 @@
#include "sounds.h"
#include "targets.h"

int dpulse[16] = { 0 };
static int dpulse[16];

const char gcr_encode_table[16] = {
static const char gcr_encode_table[16] = {
0b11001, 0b11011, 0b10010, 0b10011, 0b11101, 0b10101, 0b10110, 0b10111,
0b11010, 0b01001, 0b01010, 0b01011, 0b11110, 0b01101, 0b01110, 0b01111
};

char EDT_ARM_ENABLE = 0;
char EDT_ARM_ENABLE;
char EDT_ARMED = 0;
int shift_amount = 0;
uint32_t gcrnumber;
static int shift_amount;
static uint32_t gcrnumber;
extern int zero_crosses;
extern char send_telemetry;
extern uint8_t max_duty_cycle_change;
int dshot_full_number;
static int dshot_full_number;
extern char play_tone_flag;
uint8_t command_count = 0;
uint8_t last_command = 0;
uint8_t high_pin_count = 0;
uint32_t gcr[37] = { 0 };
uint16_t dshot_frametime;
uint16_t dshot_goodcounts;
uint16_t dshot_badcounts;
char dshot_extended_telemetry = 0;
uint16_t send_extended_dshot = 0;
uint16_t processtime = 0;
uint16_t halfpulsetime = 0;
static uint8_t command_count;
static uint8_t last_command;
static uint8_t high_pin_count;
uint32_t gcr[37];
static uint16_t dshot_frametime;
static uint16_t dshot_goodcounts;
static uint16_t dshot_badcounts;
char dshot_extended_telemetry;
uint16_t send_extended_dshot;
static uint16_t halfpulsetime;

void computeDshotDMA()
{
Expand Down
Loading
Loading