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#19 from bphermansson/numerical_output
Numerical output
- Loading branch information
Showing
5 changed files
with
183 additions
and
24 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 |
---|---|---|
|
@@ -2,3 +2,5 @@ build | |
.vscode | ||
*.txt | ||
CMakeLists.txt | ||
BUILD.md | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ | |
#define ISLOCKED "lockstatus" | ||
#define CHARGING_STATUS "chargestatus" | ||
#define HVAC_STATUS "hvac" | ||
#define HVAC_STATUS_OPERATING "hvacoperating" | ||
#define HVAC_STATUS_MODE "hvacmode" | ||
#define UPDATE "update" | ||
#define REMAINING_CHARGING_STATUS "remaningchargestatus" | ||
#define AIRCON "aircon" | ||
|
@@ -43,6 +45,8 @@ typedef enum phev_args_commands_t { | |
CMD_ISLOCKED, | ||
CMD_CHARGING_STATUS, | ||
CMD_HVAC_STATUS, | ||
CMD_HVAC_STATUS_OPERATING, | ||
CMD_HVAC_STATUS_MODE, | ||
CMD_REMAINING_CHARGING_STATUS, | ||
CMD_AIRCON, | ||
CMD_PANIC, | ||
|
@@ -62,6 +66,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; | ||
|
@@ -78,13 +83,14 @@ 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\nchargestatus\nlockstatus\nhvac\nremaningchargestatus\nupdate\naircon [on|off]\nacmode [heat|cool|windscreen] [10|20|30]\nheadlights [on|off]\nparkinglights [on|off]\nmonitor\nget <register>"; | ||
static char phev_args_args_doc[] = "register\nbattery\nchargestatus\nlockstatus\nhvac\nhvacoperating\nhvacmode\nremaningchargestatus\nupdate\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."}, | ||
{ "car-model", 'c', "<YEAR>",0, "Model Year."}, | ||
{ "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[]); | ||
|
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