Feature/rc lights more names and status values#92
Conversation
2c9e574 to
c798a35
Compare
yang1070
left a comment
There was a problem hiding this comment.
Can we re-base this PR so that it only include the changes for rc_lights_more_names_and_status_values, now it mixed with other stuff, it is hard to review
| result.push({ | ||
| name: struct[i], | ||
| densityAvailable: true, | ||
| statusAvailable: true, |
There was a problem hiding this comment.
Please make some lightnames with xyz-Available as false, or not include the item at all,
since I want to test the cases that for example statusAvailable=false, or statusAvailable is not include, how core handle the request. I don't want to change the source code directly.
It is OK for me to change some configuration file (for example hmi_capabilitiy.json, but that is not used by HMI so far) and launch HMI. It is not OK for me to change the source code of HMI.
There was a problem hiding this comment.
3527b77 to
d0b79be
Compare
|
@yang1070 , for now there is check box on start HMI page with sRGBColor, statusAvailable, densityAvailable capabilities. Please confirm the current implementation in case it meets expectations. Or you expect the changes of capabilities not for all items, but for each light item separately? |
|
@GetmanetsIrina I see the new change. I can use it to change the default capability of all lights on HMI start, it works for my testing purposes. However, it looks really weird to put something specific at that HMI start page. The method is not scale-able. We have the hmi_capabilites.json file in sdl_core repository, is it possible that sdl_hmi also has that file and HMI read that file and give response to get_capability request with the contents in the json file? |
|
@yang1070 We can not read from the .json file, because the script is executed by the browser and does not have access to the file system. But we can create a simple .js file with one variable that will contains all capabilities. And you will be able to modify this file. I already working on it. |
|
@yang1070 In 9f7262b I added file with RC_Capabilities. You can edit this file. After saving the necessary changes, you need to update the HMI page in a browser. |
Capabilities/RC_Capabilities.js
Outdated
| moduleName: 'Light', | ||
| supportedLights: [{ | ||
| name: 'FRONT_LEFT_HIGH_BEAM', | ||
| densityAvailable: false, |
There was a problem hiding this comment.
missing statusAvailable for all the light names?
Capabilities/RC_Capabilities.js
Outdated
| densityAvailable: true, | ||
| sRGBColorSpaceAvailable: true | ||
| }, { | ||
| name: 'EXTERIOR_RIGHT_LIGHTS', |
There was a problem hiding this comment.
missing EXTERIOR_ALL_LIGHTS and other new added light names.
Capabilities/RC_Capabilities.js
Outdated
| sourceAvailable: true, | ||
| volumeAvailable: true, | ||
| equalizerAvailable: true, | ||
| equalizerMaxChannelId: 100 |
Capabilities/RC_Capabilities.js
Outdated
| audioControlCapabilities: [{ | ||
| moduleName: 'AudioControlCapabilities', | ||
| sourceAvailable: true, | ||
| volumeAvailable: true, |
yang1070
left a comment
There was a problem hiding this comment.
Looks like a few newly added stuff is missing in the capabilities, please add them
|
@yang1070 Sorry, I mistakenly added capability not with the branch that you need. Already I fixed it |
Capabilities/RC_Capabilities.js
Outdated
| hdChannelAvailable: true, | ||
| rdsDataAvailable: true, | ||
| availableHDsAvailable: true, | ||
| hdRadioEnableAvailable: true, |
There was a problem hiding this comment.
why hdRadioEnableAvailable and siriusxmRadioAvailable is removed? Will it be added in other PR?
Capabilities/RC_Capabilities.js
Outdated
| sRGBColorSpaceAvailable: false | ||
| }] | ||
| }, | ||
| seatControlCapabilities: [{ |
There was a problem hiding this comment.
@yang1070 this branch doesn't contains implementation of SEAT module, because we have separate proposal for it.
so in RC_Capabilities.js we have the same capabilities as in https://github.com/smartdevicelink/sdl_core/blob/feature/rc_lights_more_names_and_status_values/src/appMain/hmi_capabilities.json
app/model/LightModel.js
Outdated
| initialization(this.locationLightNameStruct, this.lightState); | ||
| }, | ||
|
|
||
| checkEraseParameter: function(data){ |
There was a problem hiding this comment.
with the new RC_Capabilities.js change, we don't need this anymore
ca4bc0b to
eacdd6c
Compare
|
@yang1070 please look at the latest updates |
app/model/LightModel.js
Outdated
| initialization(this.locationLightNameStruct, this.lightState); | ||
| }, | ||
|
|
||
| checkEraseParameter: function(data){ |
There was a problem hiding this comment.
this only include the lightModel.js, we shall also remove the UI part that show the three check-boxes when start HMI
c8082a0 to
052ac5c
Compare
b702dbb to
b6bd674
Compare
| newLightControlData = SDL.LightModel.setLightControlData( | ||
| request.params.moduleData.lightControlData); | ||
|
|
||
| if (Object.keys(newLightControlData).length > 0) { |
There was a problem hiding this comment.
HMI shall not send a notification if a parameter is included in the request but the value is the same as the current value (i.e. no change).
I agree the issue is not limited to this PR (more lights), it applies to all modules. We shall create an issue to track that.
yang1070
left a comment
There was a problem hiding this comment.
Reviewed and tested with Iryna during the meeting.
The change looks good.
|
@theresalech Ford approves this PR. |
b6bd674 to
f5fe32e
Compare
Add new parameters to LightName struct: - `REAR_CARGO_LIGHTS` - `REAR_TRUCK_BED_LIGHTS` - `REAR_TRAILER_LIGHTS` - `LEFT_SPOT_LIGHTS` - `RIGHT_SPOT_LIGHTS` - `LEFT_PUDDLE_LIGHTS` - `RIGHT_PUDDLE_LIGHTS` - `EXTERIOR_ALL_LIGHTS` Update LightStatus struct: - `RAMP_UP` - `RAMP_DOWN` - `UNKNOWN` - `INVALID` Update light capabilities: - `statusAvailable`
f5fe32e to
4948c96
Compare
Technical task: smartdevicelink/sdl_core#2172
Update remote control lights
Add new parameters to LightName struct:
REAR_CARGO_LIGHTSREAR_TRUCK_BED_LIGHTSREAR_TRAILER_LIGHTSLEFT_SPOT_LIGHTSRIGHT_SPOT_LIGHTSLEFT_PUDDLE_LIGHTSRIGHT_PUDDLE_LIGHTSEXTERIOR_ALL_LIGHTSUpdate LightStatus struct:
RAMP_UPRAMP_DOWNUNKNOWNINVALIDUpdate light capabilities:
statusAvailable