Skip to content

Commit

Permalink
Cleaned up stray declarations and includes based on recommendations.
Browse files Browse the repository at this point in the history
  • Loading branch information
hed0rah committed Jun 16, 2024
1 parent 904d204 commit 0870e09
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
15 changes: 7 additions & 8 deletions commands/global/button_scr.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,18 @@
uint8_t button_flags[BP_BUTT_MAX-1];
char button_script_files[BP_BUTT_MAX-1][BP_FILENAME_MAX + 1];

typedef struct {
const char *verb;
const char *default_file;
} button_press_type_t;

//array of button press types
button_press_type_t button_press_types[] = {
static button_press_type_t button_press_types[] = {
{"short", "button.scr"},
{"long", "buttlong.scr"}
};

//array of default script file names
const char *button_script_files_default[] = {
"button.scr",
"buttlong.scr"
};

const uint8_t num_button_press_types = sizeof(button_press_types) / sizeof(button_press_type_t);
static const uint8_t num_button_press_types = count_of(button_press_types);

static const char * const usage[]= {
"button [short|long] [-f <file>] [-d (hiDe comments)] [-e(xit on error)] [-h(elp)]",
Expand Down
9 changes: 0 additions & 9 deletions commands/global/button_scr.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
//#include "pirate/button.h"
enum button_codes;
void button_scr_handler(struct command_result *res);
bool button_exec(enum button_codes button_code);

typedef struct {
const char *verb;
const char *default_file;
} button_press_type_t;

extern button_press_type_t button_press_types[];
extern const uint8_t num_button_press_types;
3 changes: 0 additions & 3 deletions pirate/button.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
#include "pirate.h"
#include "system_config.h"
#include "pirate/button.h"
#include "opt_args.h"
#include "commands/global/script.h"
#include "commands/global/button_scr.h"

#define BP_BUTTON_SHORT_PRESS_MS 550

Expand Down

0 comments on commit 0870e09

Please sign in to comment.