diff options
author | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-05-22 10:21:17 +0900 |
---|---|---|
committer | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-05-22 10:21:17 +0900 |
commit | 351391b2f6becfc0d64f6376396afaaa7e668672 (patch) | |
tree | d43e48a0c0ad31e6a40e7b9a53804f064469c9e7 /src | |
parent | cfcc176e4cbbd890bcd67e2b8afb61fbff10d131 (diff) |
getCarInfo() can get lightstatus.brake status
getCarInfo() can get also the lightstatus brake as follows:
- lightstatus brake : true/false
The details are described in doc/ApplicationGuide.md
in project apps/agl-service-windowmanager-2017.
Change-Id: I29b2c5b4fe129407c3b304b2fa981cbd3f4b6847
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src')
-rw-r--r-- | src/app.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/app.cpp b/src/app.cpp index 1d6b504..f457d09 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -880,6 +880,11 @@ result<json_object *> App::api_get_car_info(char const *label) { const char* val = this->crr_car_info_.car_stt; j_in = json_object_new_string(val); } + else if (0 == strcmp("lightstatus.brake", label)) { + // Get lightstatus brake status + json_bool val = this->crr_car_info_.lightstatus_brake_stt; + j_in = json_object_new_boolean(val); + } else { return Err<json_object *>("Car info does not exist"); } |