Skip to content

Commit

Permalink
Numerical option for battery, lock and charging status
Browse files Browse the repository at this point in the history
  • Loading branch information
glynhudson committed Jun 19, 2022
1 parent 9cb156f commit 677d54c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/phevargs.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ typedef struct phev_args_opts_t {
char * topic;
char * command_topic;
bool verbose;
bool numerical;
int carModel;
bool operand_on;
uint8_t operand_mode;
Expand All @@ -85,6 +86,7 @@ static struct argp_option phev_args_options[] = {
{ "host", 'h', "<HOST NAME>",OPTION_HIDDEN, "IP address of car - defaults to 192.168.8.46."},
{ "port", 'p', "<PORT NUMBER>",OPTION_HIDDEN, "Port to use - defaults to 8080"},
{ "verbose",'v',0,0,"Verbose output"},
{ "numerical",'n',0,0,"Numerical output"},
{ 0 }
};
phev_args_opts_t * phev_args_parse(int argc, char *argv[]);
Expand Down
4 changes: 4 additions & 0 deletions src/phevargs.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ static error_t phev_args_parse_opt(int key, char *arg, struct argp_state *state)
opts->verbose = true;
break;
}
case 'n': {
opts->numerical = true;
break;
}
case 'c': {
opts->carModel = atoi(arg);
break;
Expand Down

0 comments on commit 677d54c

Please sign in to comment.