forked from phev-remote/phevctl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request phev-remote#4 from GMTA/add-parking-lights-support
Add parking lights support
- Loading branch information
Showing
3 changed files
with
39 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
#include <stdint.h> | ||
|
||
#define HEADLIGHTS "headlights" | ||
#define PARKING_LIGHTS "parkinglights" | ||
#define BATTERY "battery" | ||
#define AIRCON "aircon" | ||
#define AIRCON_MODE "acmode" | ||
|
@@ -24,7 +25,20 @@ | |
#define WINDSCREEN "windscreen" | ||
#define WAIT_FOR_REG_MAX 40 | ||
|
||
typedef enum phev_args_commands_t { CMD_UNSET, CMD_MONITOR, CMD_INVALID, CMD_STATUS, CMD_REGISTER, CMD_HEADLIGHTS, CMD_BATTERY, CMD_AIRCON, CMD_AIRCON_MODE, CMD_GET_REG_VAL, CMD_DISPLAY_REG } phev_args_commands_t; | ||
typedef enum phev_args_commands_t { | ||
CMD_UNSET, | ||
CMD_MONITOR, | ||
CMD_INVALID, | ||
CMD_STATUS, | ||
CMD_REGISTER, | ||
CMD_HEADLIGHTS, | ||
CMD_PARKING_LIGHTS, | ||
CMD_BATTERY, | ||
CMD_AIRCON, | ||
CMD_AIRCON_MODE, | ||
CMD_GET_REG_VAL, | ||
CMD_DISPLAY_REG, | ||
} phev_args_commands_t; | ||
|
||
typedef struct phev_args_opts_t { | ||
bool init; | ||
|
@@ -50,7 +64,7 @@ static uint8_t PHEV_ARGS_DEFAULT_MAC[] = {0,0,0,0,0,0}; | |
static const char * phev_args_argp_program_version = "Version\t" VERSION; | ||
static const char * phev_args_argp_program_bug_address = "[email protected]"; | ||
static char phev_args_doc[] = "\n\nProgram to control the car via the remote WiFi interface. Requires this device to be connected to the REMOTE**** access point with a valid IP address, which is on the 192.168.8.x subnet.\n\nTHIS PROGRAM COMES WITH NO WARRANTY ANY DAMAGE TO THE CAR OR ANY OTHER EQUIPMENT IS AT THE USERS OWN RISK."; | ||
static char phev_args_args_doc[] = "register\nbattery\naircon [on|off]\nacmode [heat|cool|windscreen] [10|20|30]\nheadlights [on|off]\nmonitor\nget <register>"; | ||
static char phev_args_args_doc[] = "register\nbattery\naircon [on|off]\nacmode [heat|cool|windscreen] [10|20|30]\nheadlights [on|off]\nparkinglights [on|off]\nmonitor\nget <register>"; | ||
static struct argp_option phev_args_options[] = { | ||
{ "mac", 'm', "<MAC ADDRESS>",0, "MAC address."}, | ||
{ "host", 'h', "<HOST NAME>",OPTION_HIDDEN, "IP address of car - defaults to 192.168.8.46."}, | ||
|
@@ -60,5 +74,4 @@ static struct argp_option phev_args_options[] = { | |
}; | ||
phev_args_opts_t * phev_args_parse(int argc, char *argv[]); | ||
|
||
|
||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters